-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails with could not find @babel/plugin-syntax-import-meta #325
Comments
Thanks! We removed a bunch of old babel deps to make Snowpack lighter, looks like this one got removed incorrectly. Fixed in c00ce85 |
I still get this error using snowpack And even when i installed the missing package, it throws with the next I think Snowpack resolution algorithm doesn't understand the node_modules structure of pnpm. When i used But i really hope Snowpack works well with pnpm. Because they are both great tools that make web coding lightning fast. ⚡ ❤️ |
I don't think we're doing anything wrong here, our app-scripts-react is where "@babel/preset-react" is used, and where it's defined as a dependency. It seems like pnpm (or maybe Babel) is incorrectly loading it as a bad/known dependency. I'd love to support pnpm without the |
One way to be compatible with pnpm would be to flatten the templates generated by CSA. For example, the To flatten...
Technically only step 2 is required but since the dependencies will be listed in the root template I personally think it makes sense to flatten out the config too. Step 2 is enough to hoist the babel plugins for babel's resolution strategy to work. This flattening would be necessary for any plugin or tool that has a resolution strategy not compatible with node. So far I've only run into the issue with babel but have not tested all the templates or other plugins such as the webpack bundling plugin. I would be happy to test other templates/plugins, update the templates, test compatibility with pnpm, npm, and yarn, and then make a PR if this flattening out strategy seems like a sensible direction to take. Thanks for the incredible tooling! |
Thanks for the feedback! I agree, the "extends" property was great early on for automatically updating users to the latest config behind the scenes. But, now that that config has baked and settled a bit, that benefit is no longer as important. |
I have the same error with pnpm by now |
This PR should solve the error by removing the "extends" usage in our Create Snowpack App templates |
Been using 2.0 beta from the day it dropped, it's working out really great on development so far 👏 Thank you for the library.
Issue:
Running
snowpack build --bundle
fails with the message:Reproduction:
I have been working on a repo at https://github.com/agneym/reco, it's not a minimal reproduction(sorry), but I believe it's not doing anything complex at the moment
Expected:
Build succeeds.
The text was updated successfully, but these errors were encountered: