-
Notifications
You must be signed in to change notification settings - Fork 60
'babel-preset-es2015' module not found #2
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
Comments
It looks like you've installed the Double-check that your {
"presets": [ "es2015-rollup" ]
} That should fix the problem. |
@jlengstorf Thanks for the quick response dude. My
|
That's odd. Just in case, try this: npm prune
npm cache clean
npm install Then run it again. For some sanity-checking: |
I just pruned, cleared cache and installed again and called I went ahead and created a repo if you are interested in checking it out. I'm sure you are busy so no rush. Also thanks for the write up on rollup.js I know I find it extremely helpful. |
I also had that issue and found a fix here: https://github.com/rollup/rollup-plugin-babel/issues/72 Again, thank you J for the great Rollup course. I learn in lots of places, some are well established and funded organizations and your teaching and course configuration is well above the standard. I'd love it if you would produce one about Ramda and functional JS. |
@2474 This is odd, because I just cloned your repo, cleaned my npm cache, and ran I'm not sure if I've got something locally installed that would change the outcome you're getting, but here's my current setup: $ node -v
v4.4.5
$ npm -v
3.10.4
$ ./node_modules/.bin/rollup -c
# No error here.
# For the sake of completeness, my globally-installed packages.
$ npm list -g --depth=0
/usr/local/lib
├── bower@1.7.9
├── hexo-cli@1.0.2
├── hugo@0.0.3
├── node-libs-browser@1.0.0
└── npm@3.10.4 But, like @eylon-uk mentioned, rollup/rollup-plugin-babel#72 has a fix. The relevant config is here: {
"presets": [
[
"es2015",
{
"modules": false
}
]
],
"plugins": ["external-helpers"]
} I just tried that in your repo and it works as expected. Give it a shot and let me know if it's still causing problems. |
I'm: Node 4.4.5 OSX Yosemite 10.10.5 I'll try updating NPM and all else, I'll check out the issue @eylon-uk mentioned. Thanks for looking into this guys! |
I have the same issue. The above solution did not work. |
@yonida Just to sanity check: is your If you haven't already, also try: npm install --save-dev babel-preset-es2015 That plus the fix in my comment above should get you up and running. |
I had the same issue , |
I try { "presets": [ [ "es2015", { "modules": false } ] ] },it works; |
@jlengstorf #12 help me! |
我看了以上评论,还是没能解决我的问题!当我运行 Error transforming D:\workSpace\git\rollup-learning\src\scripts\main.js with 'babel' plugin: It look
s like your Babel configuration specifies a module transformer. Please disable it. If you're using t
he "es2015" preset, consider using "es2015-rollup" instead. |
@gongph please share your repo. This looks like a configuration error. Please use the config in this comment and see if it helps. |
my repo is Here . @jlengstorf |
@gongph Your |
Any explanation where this is coming from? Tested the repo without modifications. Works on one machine (OS X) fails on the other as described here (Ubuntu 16.04, although I doubt that the OS is the problem). (P.S.: many thanks for the tutorial) |
I wish I knew. I'm thinking this should probably be opened as an issue on rollup/babel-preset-es2015-rollup, because it's intermittent and — at least judging by the errors — shouldn't be happening. @wellnoidea, would you mind sharing the error code you're getting on the machine that fails? That'll probably be really helpful for the preset's maintainers. Once I have that, I'll open an issue. |
@wellnoidea I edited my last comment to mention you, but I'm not sure if it actually notified you. (If so, sorry!) If it didn't, I'm hoping to get the error code you're getting on the machine that fails. I'd like to open an issue with the |
@jlengstorf Sorry for the delay. I'll post code & error by tomorrow. |
Checked both machines
after upgrading npm on the second machine to 3.6.0 installation works just fine |
Confirmed. Downgrading to npm 2.15.9, reinstalling the node dependencies via npm will bring the error back. |
I tested with this repo and a minimized version: |
Awesome: it's an That's incredibly helpful. I'll add a note to the article and close this afterward. Very much appreciate your help, @wellnoidea! |
The solution is to use a newer version:
|
Having the same issue.... ERROR in ./js/app.js |
simply change our .babelrc file. Here is the example of new .babelrc file : |
Have any idea? Seems like
npm install --save-dev babel-preset-es2015-rollup
installed just fine however below still happens.Node: 4.4.5
EDIT: My
.babelrc
is:The text was updated successfully, but these errors were encountered: