VulcanJS / Vulcan

🌋 A toolkit to quickly build apps with React, GraphQL & Meteor
http://vulcanjs.org
MIT License
7.98k stars 1.89k forks source link

npm install causes "Unexpected string in JSON" #2431

Closed bmalehorn closed 4 years ago

bmalehorn commented 5 years ago

Hi, I was trying to set up Vulcan but ran into this error when I ran npm install and figured I should report it:

> git clone https://github.com/VulcanJS/Vulcan
> cd Vulcan/
> mv sample_settings.json settings.json
> npm install
npm ERR! Unexpected string in JSON at position 626745 while parsing '{
npm ERR!   "name": "Vulcan",
npm ERR!   "version": "1.13'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/brian/.npm/_logs/2019-11-03T00_35_00_188Z-debug.log

Some system information:

> node --version
v11.15.0
> npm --version
6.7.0
> uname -a
Linux sen 5.3.0-18-generic #19-Ubuntu SMP Tue Oct 8 20:14:06 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Here's the full log of /home/brian/.npm/_logs/2019-11-03T00_35_00_188Z-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/home/brian/.asdf/installs/nodejs/11.15.0/bin/node',
1 verbose cli   '/home/brian/.asdf/installs/nodejs/11.15.0/bin/npm',
1 verbose cli   'install' ]
2 info using npm@6.7.0
3 info using node@v11.15.0
4 verbose npm-session c05a00d667ee8afa
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall Vulcan@1.13.5
7 info lifecycle Vulcan@1.13.5~preinstall: Vulcan@1.13.5
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing stage:loadCurrentTree Completed in 31ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
14 silly install loadShrinkwrap
15 timing stage:rollbackFailedOptional Completed in 1ms
16 timing stage:runTopLevelLifecycles Completed in 85ms
17 silly saveTree Vulcan@1.13.5
18 verbose stack SyntaxError: Unexpected string in JSON at position 626745 while parsing '{
18 verbose stack   "name": "Vulcan",
18 verbose stack   "version": "1.13'
18 verbose stack     at JSON.parse (<anonymous>)
18 verbose stack     at parseJson (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/json-parse-better-errors/index.js:7:17)
18 verbose stack     at module.exports (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/lib/utils/parse-json.js:4:10)
18 verbose stack     at parsePkgLock (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/lib/install/read-shrinkwrap.js:68:12)
18 verbose stack     at BB.join (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/lib/install/read-shrinkwrap.js:28:22)
18 verbose stack     at tryCatcher (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
18 verbose stack     at Holder$3._callFunction (eval at generateHolderClass (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:92:16), <anonymous>:14:44)
18 verbose stack     at Holder$3.checkFulfillment (eval at generateHolderClass (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:92:16), <anonymous>:29:30)
18 verbose stack     at Promise.eval (eval at thenCallback (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:14:16), <anonymous>:6:20)
18 verbose stack     at Promise._settlePromise (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:566:21)
18 verbose stack     at Promise._settlePromise0 (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
18 verbose stack     at Promise._settlePromises (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:694:18)
18 verbose stack     at Promise._fulfill (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
18 verbose stack     at Promise._settlePromise (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:582:21)
18 verbose stack     at Promise._settlePromise0 (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
18 verbose stack     at Promise._settlePromises (/home/brian/.asdf/installs/nodejs/11.15.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:694:18)
19 verbose cwd /home/brian/Vulcan
20 verbose Linux 5.3.0-18-generic
21 verbose argv "/home/brian/.asdf/installs/nodejs/11.15.0/bin/node" "/home/brian/.asdf/installs/nodejs/11.15.0/bin/npm" "install"
22 verbose node v11.15.0
23 verbose npm  v6.7.0
24 error Unexpected string in JSON at position 626745 while parsing '{
24 error   "name": "Vulcan",
24 error   "version": "1.13'
25 verbose exit [ 1, true ]

Looks like a pretty straightforward syntax error, but I can't find where it's coming from.

gland2015 commented 5 years ago

package-lock.json at line 15852: "util-deprecate": "~1.0.1" , There is no comma. add is ok .

eric-burel commented 5 years ago

Hi, is it in Vulcan or the Starter? I guess package-lock.json must be removed. We should stop tracking it down anyway it's more trouble than help

gland2015 commented 5 years ago

Hi,it in Vulcan, here, https://github.com/VulcanJS/Vulcan/blob/devel/package-lock.json#L15852 , There is no comma,It's strange to make a mistake here。

eric-burel commented 4 years ago

Closing as such issues are solved after some updates