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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM failure on npm install --save fastify (Unexpected token in parsing near find-my-way-0.2.4.tgz) #1482

Closed
lmammino opened this issue Feb 25, 2019 · 14 comments

Comments

@lmammino
Copy link
Member

lmammino commented Feb 25, 2019

馃悰 Bug Report

There seems to be an issue with the current package setup for 2.0.0 (and the other RC).

When trying to install with npm i --save fastify

I get the following error:

npm ERR! Unexpected token  in JSON at position 2079 while parsing near '...d-my-way-0.2.4.tgz"}...'

npm ERR! A complete log of this run can be found in:
npm ERR!     .../.npm/_logs/2019-02-25T15_20_03_412Z-debug.log

Same happens with the following sequence of commands:

git clone https://github.com/fastify/fastify.git
cd fastify
npm install

Your Environment

  • node version: v11.8.0 (npm 6.8.0)
  • fastify version: >=2.0.0
  • os: Mac
  • Also tested on another laptop with node 11.9 and npm 6.5 with same error
  • Also tested on different networks using VPNs (so doesn't seem cache related)

Updated

It seems that even doing the following will raise the error:

npm i --save find-my-way

Output:

npm ERR! Unexpected token  in JSON at position 2079 while parsing near '...d-my-way-0.2.4.tgz"}...'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lucianomammino/.npm/_logs/2019-02-25T15_25_12_551Z-debug.log
@mcollina
Copy link
Member

It seems it's a bug on npm :(.

@delvedor
Copy link
Member

Yup, we are seeing a lot of failing builds on Windows as well.
I've pinged npm on twitter, but I didn't get an answer yet.

@lmammino
Copy link
Member Author

Thanks for the quick reply @mcollina and @delvedor

Fingers crossed then 馃

@gunnartorfis
Copy link

I'm seeing this error as well. Not on my local machine though (macOS), but only on Elastic Beanstalk. Both using npm and yarn.

This is stopping our whole deployment cycle - I will be monitoring this thread for updates. 馃憖

@mcollina
Copy link
Member

Can somebody fetch one of those npm log files? Maybe there is some info there that we can help diagnose.

Is this happening only on Fastify v2?

@lmammino
Copy link
Member Author

Back home and everything seems to install fine (both fastify v2 and v1)

screenshot 2019-02-25 at 19 21 18

I'll double check tomorrow again at work and get you the npm logs if still failing

@delvedor
Copy link
Member

Apparently, also CI has started working again. I'll continue to monitor this.

@lmammino
Copy link
Member Author

All back to normal even at the office... I'd say definitely an NPM glitch!

@mcollina
Copy link
Member

CI seems to still be failing.

@lmammino
Copy link
Member Author

Is there any option to trigger a build without cache in the CI?

@mcollina
Copy link
Member

I don't think we have any caching on Azure, but I might be wrong.

@gunnartorfis
Copy link

This is still failing for me. I am using AWS EB & Docker - not really sure what's the best way for me to debug this.

"fastify": "^2.0.0",
"fastify-cli": "^1.0.0",
"fastify-plugin": "^1.5.0",

Here's a screenshot from EB's logs (/var/log/eb-commandprocessor.log)
screenshot 2019-02-26 at 15 05 31

@mcollina
Copy link
Member

Unfortunately it's an NPM bug. I would recommend to contact NPM directly, there is literally nothing we can do. Feel free to reopen if you got something that we can do to fix this.

(One solution might be to deploy Verdaccio instance in between.)

@mcollina
Copy link
Member

The link this bug is being discussed is https://npm.community/t/error-unexpected-token-in-json-at-position/5671.

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

4 participants