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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install error #26

Closed
wjbright opened this issue Jun 13, 2018 · 11 comments
Closed

npm install error #26

wjbright opened this issue Jun 13, 2018 · 11 comments

Comments

@wjbright
Copy link

I get this error when I try npm install

npm WARN deprecated [email protected]: 1.2.0 should have been a major version bump
npm ERR! Unexpected end of JSON input while parsing near '...11.6","eslint":"2.2.0'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\hp\AppData\Roaming\npm-cache\_logs\2018-06-13T00_17_40_195Z-debug.log

2018-06-13T00_17_40_195Z-debug.log

@adriandarian
Copy link

you probably have an extra comma at the end of your {} notation or inside of the brackets. in <ES7 javascript that will through a syntax error

@einazare
Copy link
Contributor

Hello @wjbright ,

Can you please paste here your package.json ?

Best,
Manu

@wjbright
Copy link
Author

wjbright commented Jun 14, 2018

I fixed this issue by clearing the cache npm cache clean --force and runnig npm install again. But I ran into another issue while completing the installation:
npm ERR! Failed at the [email protected] postinstall script.

Here is my package.json:

{ "name": "react-blur-admin", "version": "0.11.1", "description": "React Blur Admin - Styles And Components", "main": "dist", "scripts": { "clean": "rm -rf dist && mkdir dist && mkdir dist/assets && mkdir dist/assets/styles && mkdir dist/assets/fonts && mkdir dist/assets/img", "deploy": "npm run clean && npm run deployjs && npm run deploycss && npm run deployassets", "deployassets": "cp -R src/assets/fonts dist/assets && cp -R src/assets/img dist/assets", "deploycss": "node-sass -r src/assets/styles/app.scss dist/assets/styles/react-blur-admin.min.css && cp -R src/assets/styles/bootstrap/fonts/* dist/assets/fonts", "deployjs": "babel -d dist src", "lint": "node_modules/.bin/eslint --ext js src/", "prepublish": "npm run deploy", "preversion": "npm run lint && npm run test", "test": "NODE_ENV=test NODE_PATH=. ./node_modules/.bin/mocha test/.setup.js test --recursive" }, "repository": { "type": "git", "url": "git+https://github.com/knledg/react-blur-admin.git" }, "keywords": [ "react", "blur admin" ], "author": "Consolidated Knowledge", "license": "MIT", "bugs": { "url": "https://github.com/knledg/react-blur-admin/issues" }, "homepage": "https://github.com/knledg/react-blur-admin#readme", "peerDependencies": { "react": ">=0.14.0" }, "dependencies": { "babel-cli": "^6.9.0", "classnames": "^2.2.5", "lodash": "^4.7.0", "react-flex-proto": "^1.0.0" }, "devDependencies": { "babel-core": "^6.9.0", "babel-eslint": "^6.0.4", "babel-loader": "^6.2.4", "babel-plugin-transform-runtime": "^6.5.0", "babel-preset-es2015": "^6.5.0", "babel-preset-react": "^6.5.0", "babel-preset-stage-1": "^6.5.0", "babel-register": "^6.11.6", "babelify": "^7.2.0", "chai": "^3.5.0", "enzyme": "^2.3.0", "eslint": "^2.10.2", "eslint-plugin-react": "^5.1.1", "estraverse-fb": "^1.3.1", "jsdom": "^9.4.1", "mocha": "^2.5.2", "mocha-sinon": "^1.1.5", "node-sass": "^3.3.2", "react": "^15.1.0", "react-addons-test-utils": "^15.1.0", "react-dom": "^15.1.0", "sinon": "^1.17.4", "uglifyjs": "^2.4.10", "webpack": "^1.13.1" } }

@einazare
Copy link
Contributor

Hello again @wjbright ,

Are you sure you are on the right Github repo?
From what i can see in your package.json there is no resemblance whatsoever with the package.json of our product.

Best,
Manu

@einazare einazare removed the bug label Jun 14, 2018
@wjbright
Copy link
Author

Hello @elnazare,

Sorry, I pasted the wrong package.json

{ "name": "light-bootstrap-dashboard-react", "version": "1.2.0", "private": true, "dependencies": { "bootstrap": "3.3.7", "chartist": "0.10.1", "node-sass": "4.6.1", "node-sass-chokidar": "0.0.3", "npm-run-all": "4.1.2", "react": "16.2.0", "react-bootstrap": "0.32.1", "react-chartist": "0.13.1", "react-dom": "16.2.0", "react-google-maps": "9.4.5", "react-notification-system": "0.2.17", "react-router-dom": "4.2.2", "react-scripts": "1.1.1" }, "scripts": { "build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/", "watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive", "start-js": "react-scripts start", "start": "npm-run-all -p watch-css start-js", "build": "npm run build-css && react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" } }

@einazare
Copy link
Contributor

Hello again @wjbright ,

It is quite strange, it give you an error about [email protected], but in our product we use "node-sass":"4.6.1",.
Not sure what the problem could be.
Can you give me access to your project to make some tests?

Best,
Manu

@rylew2
Copy link

rylew2 commented Aug 24, 2018

Not sure if it's related, but node-sass less than 4.9 doesn't seem compatible with Node versions 10.0 or higher . I had to either downgrade Node back to 9.8 or upgrade node-sass to 4.9.x

You can see the issue here: ionic-team/ionic-app-scripts#1435
sass/node-sass#2345

@Theeeus
Copy link

Theeeus commented Nov 20, 2018

I'm having the same issue. I've tried updating the versions of react, react-dom, node-sass, but nothing works.

This is the error message I get:
npm ERR! Unexpected end of JSON input while parsing near '...s":{"coveralls":"^2.1'

Node: 8.11.4
NPM: 6.2.0

@einazare
Copy link
Contributor

einazare commented Dec 4, 2018

Hello there @Theeeus ,

Thank you for your interest in working with our products.
If I download this product and run npm install && npm start everything works perfectly.
By updating our dependencies, there could be errors like the ones from above. Please revert the changes back to what they were.

Best,Manu

@MbalaDan
Copy link

try this: "npm cache clean --force"

@einazare einazare closed this as completed May 2, 2019
@onyekachila
Copy link

try this: "npm cache clean --force"

Hello. Thanks so much. You are a life saver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants