Skip to content
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

Question: Is it expected to install babel presets as npm dependency? #7

Closed
fusionstrings opened this issue May 20, 2019 · 5 comments
Closed

Comments

@fusionstrings
Copy link
Contributor

I tried to use babel presets using jspm install @babel/preset-reactbut it failed with following error-

(babel plugin) Error: Cannot find module '@babel/preset-react' from '/Users/dilip/@fusionstrings/jspm-fix-test'

When I install these dependencies using npm, it works. Is it expected behaviour? All other dependencies i.e. react, react-dom is installed using jspm.

@guybedford
Copy link
Member

Is this following the workflow from https://jspm.org/docs/integrations#rollup?

Note that it is important that Rollup itself is installed and run with jspm for this to work.

@fusionstrings
Copy link
Contributor Author

Right, I am following the same guide. I am getting following error during building.

[!] (babel plugin) Error: Cannot find module '@babel/preset-react' from '/Users/dilip/github/@fusionstrings/jspm-beta-issue-require-not-found'

This is the repository https://github.com/fusionstrings/jspm-beta-issue-require-not-found
After installing babel-presets using npm, it worked

@guybedford
Copy link
Member

The issue you are having here is exactly the issue described in the Babel integration section here - https://jspm.org/docs/integrations#babel.

@guybedford
Copy link
Member

(With tracking issue for Babel at babel/babel#9888)

@fusionstrings
Copy link
Contributor Author

aha, I thought it's the case only when files are processed directly with babel cli because it's not mentioned under rollup integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants