-
Notifications
You must be signed in to change notification settings - Fork 3k
Install error: Unexpected token < in JSON at position 35 #17340
Comments
What are you using to convert the |
That whole jest block is actually not used, I should have removed it from the included gist really. Removing it from the project's |
I've just tested with some older versions of npm (v3.7.3 and v3.10.3, using nvm to switch) and the install worked as expected. Removing the |
I had the same issue and a simple |
Also, |
delete/rename file package-lock.json will work fine |
rm package-lock.json worked. |
rm package-lock.json在 npm install就好了 |
This problem still remains in npm@5.6.0, could it be fixed in upcoming version? |
@EricBeReal thanks, that's works like a charm. |
Error message: npm ERR! Unexpected token < in JSON at position 681 Solution (tentative): npm/npm#17340
simple rename package.lock to any name. After building it will create new package.lock and delete previous one |
Thank you. |
rm package-lock.json works well..thanks |
rm package-lock.json with npm v5.6 couldn't work. |
I'm opening this issue because:
What's going wrong?
Running
npm i
within a certain project produces the following error.From the debug.log it appears that npm is trying to read the load the shrinkwrap and failing. It's worth noting that this issue only occurs in this project on my current machine. I've tested on another Fedora 22 machine, (same npm and node versions) and the install works as expected. I appreciate this points to my local environment being the cause, however it looks like there may be some invalid syntax (
<
) stuck in a config file somewhere that shouldn't be there and that I am unable to clear. Here is the package.json for this project.How can the CLI team reproduce the problem?
I'm unsure how to suggest reproduction of the issue, however I'm happy to test any suggestions anyone offers and report back.
supporting information:
npm -v
prints: 5.0.3node -v
prints: 8.0.0npm config get registry
prints: https://registry.npmjs.org/The text was updated successfully, but these errors were encountered: