Polymer / pwa-starter-kit

Starter templates for building full-featured Progressive Web Apps from web components.
https://pwa-starter-kit.polymer-project.org
2.36k stars 431 forks source link

Unexpected end of JSON input while parsing near '...5.9.0","esprima":"^4.' #278

Closed shadyueh closed 5 years ago

shadyueh commented 5 years ago

After cloning the project, I try install the dependencies: npm install

then:

$ npm install
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/source-map-2bc8e05f/dist/source-map.min.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/tools/build-external-helpers.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/generator-fe1d22c0/lib/node/index.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/transformation/block-hoist-plugin.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/generator-fe1d22c0/lib/node/parentheses.js'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/transformation/file'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/generator-fe1d22c0/lib/node/whitespace.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/transformation/index.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/transformation/normalize-file.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/transformation/normalize-opts.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/transformation/plugin-pass.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/traverse-7c141034/lib/scope/binding.js'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/transformation/util'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/traverse-7c141034/lib/scope/index.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/files/configuration.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/files/index-browser.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/files/index.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/files/package.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/files/plugins.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/files/types.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/files/utils.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/helpers/config-api.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/helpers/environment.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/validation/option-assertions.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/validation/options.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/validation/plugins.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/config/validation/removed.js'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/transformation/file'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/transformation/file'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/transformation/file'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/core-39a9dc16/lib/transformation/util'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/scripts/generateTypeHelpers.js'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/scripts/generators'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/scripts/utils'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/asserts/assertNode.js'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/asserts/generated'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/builders/builder.js'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/builders/flow'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/builders/generated'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/builders/react'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/clone/clone.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/clone/cloneDeep.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/clone/cloneNode.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/clone/cloneWithoutLoc.js'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/scripts/generators'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/scripts/generators'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/scripts/generators'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/scripts/generators'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/scripts/utils'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/scripts/utils'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/scripts/utils'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/asserts/generated'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/builders/flow'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/builders/flow'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/builders/generated'
npm WARN tar ENOENT: no such file or directory, lstat '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/builders/react'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/constants/generated/index.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/modifications/flow/removeTypeDuplicates.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/utils/react/cleanJSXElementLiteralChild.js'
npm WARN tar ENOENT: no such file or directory, open '/home/izaya/PhpstormProjects/handy/node_modules/.staging/@babel/types-d5cd2e46/lib/validators/generated/index.js'
npm ERR! Unexpected end of JSON input while parsing near '...5.9.0","esprima":"^4.'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/izaya/.npm/_logs/2018-11-29T18_37_46_854Z-debug.log

Such log file:

2018-11-29T18_37_46_854Z-debug.log

keanulee commented 5 years ago

I just tried locally with Node v10.1.0/NPM 6.4.1 and couldn't reproduce. What version of Node are you using? Maybe clear node_modules/ if it exists and retry?

shadyueh commented 5 years ago

Node 10.13.0 / NPM 6.4.1

Em qui, 29 de nov de 2018 15:12, Keanu Lee <notifications@github.com escreveu:

I just tried locally with Node v10.1.0/NPM 6.4.1 and couldn't reproduce. What version of Node are you using? Maybe clear node_modules/ if it exists and retry?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Polymer/pwa-starter-kit/issues/278#issuecomment-442956175, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT4MElL_t9liWusvaCbwjJWeGBOKsChks5u0DF-gaJpZM4Y6TRv .

shadyueh commented 5 years ago

I already erased the node_modules and tried again. No deal.

Em qui, 29 de nov de 2018 15:12, Keanu Lee <notifications@github.com escreveu:

I just tried locally with Node v10.1.0/NPM 6.4.1 and couldn't reproduce. What version of Node are you using? Maybe clear node_modules/ if it exists and retry?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Polymer/pwa-starter-kit/issues/278#issuecomment-442956175, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT4MElL_t9liWusvaCbwjJWeGBOKsChks5u0DF-gaJpZM4Y6TRv .

frankiefu commented 5 years ago

I have the same version of node (10.13.0) and npm (6.4.1) and I couldn't reproduce the issue.

This could be somehow your npm cache is corrupted and not recoverable, seems as though clearing cache may fix it as referenced here: https://github.com/npm/npm/issues/19072

deepakjha14 commented 5 years ago

I am also stuck in the same issue today, it is still not working

keanulee commented 5 years ago

Seems to work for me this morning, maybe try npm cache clean --force?

➜  pwa-starter-kit git:(master) rm -rf node_modules 
➜  pwa-starter-kit git:(master) npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
➜  pwa-starter-kit git:(master) npm i

> fsevents@1.2.4 install /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/fsevents
> node install

[fsevents] Success: "/Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> fsevents@1.2.4 install /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/fsevents
> node install

[fsevents] Success: "/Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> wd@1.11.1 install /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/wd
> node scripts/build-browser-scripts

> puppeteer@1.11.0 install /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/puppeteer
> node install.js

Downloading Chromium r609904 - 82.7 Mb [====================] 100% 0.0s 
Chromium downloaded to /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/puppeteer/.local-chromium/mac-609904

> spawn-sync@1.0.15 postinstall /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/spawn-sync
> node postinstall

> sauce-connect-launcher@1.2.4 postinstall /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/sauce-connect-launcher
> node scripts/install.js || nodejs scripts/install.js

> wct-sauce@2.1.0 postinstall /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/wct-sauce
> node scripts/postinstall.js

Prefetching the Sauce Connect binary.
Missing Sauce Connect local proxy, downloading dependency
This will only happen once.
Downloading 10.0MB
Archive checksum verified.
Unzipping /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/sauce-connect-launcher/sc/sc-4.5.2-osx.zip
Removing /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/sauce-connect-launcher/sc/sc-4.5.2-osx.zip
Sauce Connect downloaded correctly

> wct-local@2.1.3 postinstall /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/wct-local
> node scripts/postinstall.js

----------
selenium-standalone installation starting
----------

---
selenium install:
from: https://selenium-release.storage.googleapis.com/3.12/selenium-server-standalone-3.12.0.jar
to: /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/selenium-standalone/.selenium/selenium-server/3.12.0-server.jar
---
chrome install:
from: https://chromedriver.storage.googleapis.com/2.43/chromedriver_mac64.zip
to: /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/selenium-standalone/.selenium/chromedriver/2.43-x64-chromedriver
---
firefox install:
from: https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-macos.tar.gz
to: /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/polymer-cli/node_modules/selenium-standalone/.selenium/geckodriver/0.23.0-x64-geckodriver

-----
selenium-standalone installation finished
-----

> axe-core@3.1.2 postinstall /Users/keanulee/Code/Polymer/pwa-starter-kit/node_modules/axe-core
> node build/utils/postinstall.js

added 2371 packages from 1581 contributors and audited 26071 packages in 61.342s
found 9 vulnerabilities (4 low, 3 moderate, 2 high)
  run `npm audit fix` to fix them, or `npm audit` for details
➜  pwa-starter-kit git:(master)