-
Notifications
You must be signed in to change notification settings - Fork 710
SyntaxError: Unexpected token import #80
Comments
I also ran through each of the of the steps that make up |
|
Hmmm... I'm not sure what's up there. It doesn't seem to have the same issue for me. I did notice something broke the validate script and I fixed that, but everything's working on a clean clone for me :-/ |
Another dev I work with confirmed that it works as expected, so it must be something on my computer, maybe a global npm package. I removed webpack and babel-cli from global installed, and made a new clone but the bug persisted. Not sure what's happening, but it seems to be with babel. |
git version: 2.15.0 I'm getting the same error when I try to run any of the tests. Running
So it may be a problem with create-react-app. Looking at this create-react-app issue, this problem should be fixed for |
I had the same problem. I added
to my |
i do have the same import issue though. i removed the same global installs as @nathanBrenner did. but no luck there. i also added nvm to specify a different version of node because i am running version 10 by default. also didn't solve it. i did noticed that the
which should be an array but when i change it to an array it doenst work. |
i managed to go around it by adding my own babelrc file in the client folder and updating the babelrc in the simpel react folder |
Environment info:
node
version (node --version
): 8.11.3npm
version (npm --version
): 5.6.0yarn
version (yarn --version
): 1.5.1Problem description:
Unable to write any unit tests because:
npm run setup --silent
npm run test:react
In
other/simple-react/__tests__/item-list.todo.js
, I addedimport React from 'react'
output from jest:
This error is also thrown during
npm run setup --silent
along withI tried running
NODE_ENV=development
and NODE_ENV=production. Output from those commands were differnent, but
npm run test:react` fails with the same error.Suggested solution:
The text was updated successfully, but these errors were encountered: