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
SyntaxError: Unexpected identifier after upgrading to Babel7 #9436
Comments
Hey @rust485! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
What does |
@nicolo-ribaudo I can't seem to get that command to work. Using
|
@nicolo-ribaudo I made a cwd.js file and made the script run The cwd is the root folder of my project. |
FIXED Deleting the root folder and re-cloning the project in the same spot in my FS didn't work. Neither did deleting Node and all stored data for npm. What did work was cloning the project into a completely different spot in my FS. Not sure if this should be closed or not. |
Possibly related, we're running into unexpected identifier issues as well on various different platforms. For example
But the following will pass:
However, on some machines, no problem will occur at all. For example, our travis fails |
Oh! Good catch, I searched last week for a match and couldn't find one. I agree. |
Having similiar issue, i keep getting this when i'm trying to import express import express from 'express'; SyntaxError: Unexpected identifier |
@madeleke I actually ran into the problem again and figured out the source of the error. I found that the soft link to my root project folder was causing the errors. I could successfully run my project if I CD'd all the way to my project. But, if I attempted to get to the project via a soft link and run the code, I would get the error every time. This was a soft link generated with git bash on a windows system. Not sure if this happens on Unix systems as well though. @nicolo-ribaudo Not sure if this is a babel issue that should be re-opened or if it should be left closed. |
I cannot run my node.js project with babel-node.
I am able to run babel
and then
However, my package.json defines serve as
and running that returns the following error:
.babelrc
Expected behavior/code
This is failing in my server.js at line 1, which has import express from 'express'.
This all worked 100% fine before upgrading to babel7.
Environment
The text was updated successfully, but these errors were encountered: