Comments (10)
Yeah I can't recall running into anything like this in the past. Some shebang shenanigans here and there I believe but noting resembling this.
Happy to be a guinea pig to help resolve of course.
from microsite.
I just cloned the template manually to build and that portion does seem to be working now. Output certainly seems in-line with what I'd expect.
from microsite.
I'll close this now as the problems all seem to be addressed. Thanks for your quick response, I look forward to using Microsite!
from microsite.
Yikes! Sorry this is happening, but thanks for opening an issue.
I assume this is the first time you've run into something like this? I can think of one shared thing between the create-microsite
and microsite
packages that is probably pretty uncommon—they pass the following arguments to node
via the shebang at the top of the file.
#!/usr/bin/env node --experimental-modules --experimental-specifier-resolution=node
I tracked down this comment on StackOverflow which suggests that Linux doesn't handle arguments passed to node in this way. I'll do some more digging and see what I can come up with.
from microsite.
Really hoping these changes fix your problem. Can you try again with npm init microsite
(should use [email protected]
automatically.) Assuming that works, [email protected]
should also work now!
The resolution here involved a few things:
I removed all the flags from the shebang in create-microsite
, since node@14 is LTS and has unflagged --experimental-modules
and I wasn't actually using --experimental-specifier-resolution=node
.
microsite
was a bit harder, since I was using bare imports. typescript
won't rewrite them for you (see typescript#16577
), but it turns out you can add the .js
extension in the source without a problem. This removed the need for --experimental-specifier-resolution=node
.
So now both packages have no arguments in the shebang (#!/usr/bin/env node
). That should work cross-platform without a problem.
from microsite.
Hmm, unless I'm using this incorrectly, no project actually gets created, though the command does now finish. Can't find the project anywhere in my home directory, so I assume it's just not written?
from microsite.
Glad it actually runs now! Can confirm that you're using it correctly! That's weird that you're not seeing any output... I'm going to try to reproduce.
from microsite.
Awesome! create-microsite
was swallowing uncaught errors, so maybe the output will be more helpful now?
Really appreciate you taking the time to give this tool a shot!
from microsite.
She works now! Looks like it wasn't a swallowed error but changing from join
to resolve
did the trick.
from microsite.
Awesome, I suspected that might be the case. Thanks for triaging this with me! That's a ✅ on Microsite's first real issue.
By the way, as you're playing around with things, you can pass the following to
microsite build
.--debug-hydration
will log out component hydration events and--no-clean
will keep the intermediate output. I'll add this as a note somewhere.
from microsite.
Related Issues (20)
- Remove defer from inline scripts HOT 3
- Move `microsite-templates` into this repo HOT 1
- Doesn't do the thing 🙃 HOT 3
- Partial hydration causes Preact to be fetched twice HOT 10
- production build fails when CSS module is imported on multiple pages HOT 2
- getStaticProps + node builtins + dev server fails HOT 1
- Preact import regex matches too much HOT 2
- Preact CDN lookup fails for non-hardcoded submodules HOT 1
- Enhancement: Support SSR-able components as props for hydrated components HOT 7
- getStaticPaths uses module’s path when returning params object HOT 1
- [RFC] Built-in Markdown/MDX Support HOT 2
- Dynamic routes won't work in dev mode HOT 4
- Hydrated component isn't initialized in prod builds when it is exported/imported under a name different from the name of the component it decorates HOT 6
- Make withHydrate a no-op when nested rather than an error
- Hydration fails with nested props arrays/objects HOT 7
- Build fails with "Error: You must supply options.input to rollup"
- import.meta.env.SSR is true on the client HOT 1
- Preact modules are loaded with `modulepreload` even if they're not used
- dev server fails to load fetch HOT 1
- Add SCSS/SASS support?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsite.