Error while installing aurelia project dependencies

Hello, I am new to aurelia , I installed aurelia using command line npm install aurelia-cli -g successfully. I created demo project with typescript app. But while installing dependencies npm install I am getting error as shown below.

“npm ERR! Unexpected end of JSON input while parsing near '…0.1.10”},"devDependen’ "

I am trying this in windows and my node version is : 10.16.3 and npm version is : 6.9.0

Any help is appreciated

1 Like

Can you paste your project’s package.json in full here?

1 Like

{
“name”: “aurelia-app”,
“description”: “An Aurelia client application.”,
“version”: “0.1.0”,
“repository”: {
“type”: “???”,
“url”: “???”
},
“license”: “MIT”,
“dependencies”: {
“aurelia-bootstrapper”: “^2.3.2”,
“aurelia-animator-css”: “^1.0.4”
},
“devDependencies”: {
“aurelia-cli”: “^1.0.2”,
“aurelia-testing”: “^1.0.0”,
“aurelia-tools”: “^2.0.0”,
“gulp”: “^4.0.0”,
“minimatch”: “^3.0.4”,
“through2”: “^3.0.0”,
“vinyl-fs”: “^3.0.3”,
“promise-polyfill”: “^8.1.0”,
“ts-loader”: “^5.2.1”,
“ts-node”: “^7.0.1”,
@types/node”: “^10.11.6”,
@types/lodash”: “^4.14.117”,
@types/webpack”: “^4.4.15”,
“typescript”: “^3.1.2”,
“gulp-rename”: “^1.4.0”,
“html-webpack-plugin”: “^3.2.0”,
“copy-webpack-plugin”: “^5.0.0”,
“mini-css-extract-plugin”: “^0.4.3”,
“aurelia-webpack-plugin”: “^3.0.0”,
“duplicate-package-checker-webpack-plugin”: “^3.0.0”,
“webpack”: “^4.27.0”,
“webpack-cli”: “^3.1.2”,
“webpack-dev-server”: “^3.1.9”,
“expose-loader”: “^0.7.5”,
“style-loader”: “^0.23.1”,
“url-loader”: “^1.1.2”,
“del”: “^3.0.0”,
“css-loader”: “^1.0.0”,
“file-loader”: “^2.0.0”,
“json-loader”: “^0.5.7”,
“html-loader”: “^0.5.5”,
“istanbul-instrumenter-loader”: “^3.0.1”,
“webpack-bundle-analyzer”: “^3.0.4”,
“jest”: “^24.1.0”,
“jest-cli”: “^24.1.0”,
“jest-transform-stub”: “^2.0.0”,
“aurelia-loader-nodejs”: “^1.0.1”,
“aurelia-pal-nodejs”: “^1.2.0”,
“ts-jest”: “^24.0.0”,
@types/jest”: “^24.0.9”
},
“scripts”: {
“build”: “au build”,
“start”: “au run”,
“test”: “au test”
},
“engines”: {
“node”: “>=8.9.0”
},
“jest”: {
“moduleNameMapper”: {
“^aurelia-binding$”: “/node_modules/aurelia-binding”
},
“modulePaths”: [
“/src”,
“/node_modules”
],
“moduleFileExtensions”: [
“ts”,
“js”,
“json”
],
“transform”: {
“^.+\.(css|less|sass|scss|styl|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)": "jest-transform-stub", "^.+\\.ts”: “ts-jest”
},
“testRegex”: “\.spec\.(ts|js)$”,
“setupFiles”: [
“/test/jest-pretest.ts”
],
“testEnvironment”: “node”,
“collectCoverage”: true,
“collectCoverageFrom”: [
“src//*.{js,ts}",
"!
/*.spec.{js,ts}”,
“!/node_modules/”,
“!/test/
],
“coverageDirectory”: “/test/coverage-jest”,
“coverageReporters”: [
“json”,
“lcov”,
“text”,
“html”
]
}
}

1 Like

It looks all good. No idea what went wrongly.

1 Like

Have you tried npm cache clean --force and then install?

2 Likes

Thanx , npm cache clean --force works for me