josselinchevalay / telescope

Other
12 stars 2 forks source link

Install fails due to unexpected json string: #30

Closed bonedaddy closed 6 years ago

bonedaddy commented 6 years ago

Steps to reproduce:

git clone git@github.com:josselinchevalay/telescope.git
cd telescope/
npm install --only-dev

Error: npm ERR! Unexpected string in JSON at position 67311

Debug logs:

solidity@darkmatter:~/.npm/_logs$ cat 2018-06-22T20_02_19_552Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/nodejs/node-v8.11.2-linux-x64/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   '--only-dev' ]
2 info using npm@5.6.0
3 info using node@v8.11.2
4 verbose npm-session dbd4e25ae3e23f78
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall electron-app-ipfs@1.0.0
7 info lifecycle electron-app-ipfs@1.0.0~preinstall: electron-app-ipfs@1.0.0
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 silly install loadShrinkwrap
13 silly saveTree electron-app-ipfs@1.0.0
14 verbose stack SyntaxError: Unexpected string in JSON at position 67311
14 verbose stack     at JSON.parse (<anonymous>)
14 verbose stack     at module.exports (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/lib/utils/parse-json.js:3:15)
14 verbose stack     at BB.join (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/lib/install/read-shrinkwrap.js:31:20)
14 verbose stack     at tryCatcher (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
14 verbose stack     at Holder$3._callFunction (eval at generateHolderClass (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:92:16), <anonymous>:14:44)
14 verbose stack     at Holder$3.checkFulfillment (eval at generateHolderClass (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:92:16), <anonymous>:29:30)
14 verbose stack     at Promise.eval (eval at thenCallback (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:14:16), <anonymous>:6:20)
14 verbose stack     at Promise._settlePromise (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:566:21)
14 verbose stack     at Promise._settlePromise0 (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
14 verbose stack     at Promise._settlePromises (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
14 verbose stack     at Promise._fulfill (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
14 verbose stack     at Promise._settlePromise (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:582:21)
14 verbose stack     at Promise._settlePromise0 (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
14 verbose stack     at Promise._settlePromises (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
14 verbose stack     at Promise._fulfill (/usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
14 verbose stack     at /usr/local/bin/nodejs/node-v8.11.2-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/nodeback.js:42:21
15 verbose cwd /home/solidity/Documents/Code/telescope
16 verbose Linux 4.13.0-45-generic
17 verbose argv "/usr/local/bin/nodejs/node-v8.11.2-linux-x64/bin/node" "/usr/local/bin/npm" "install" "--only-dev"
18 verbose node v8.11.2
19 verbose npm  v5.6.0
20 error Unexpected string in JSON at position 67311
21 verbose exit [ 1, true ]
josselinchevalay commented 6 years ago

hi postables,

wich version of node js and npm do you use

bonedaddy commented 6 years ago

Node: v8.11.2 NPM: 5.6.0

josselinchevalay commented 6 years ago

try that : https://stackoverflow.com/questions/46703864/receiving-npm-err-unexpected-string-in-json-at-position-20938-within-an-ionic-3 if works that can serve to workaround pending reach why.

so rm package-lock.json and run npm install --only-dev

regards

josselinchevalay commented 6 years ago

ok package-lock seems corrupted i will change that

bonedaddy commented 6 years ago

So far your rm package-lock.json is working and it's currently installing.