1
我想在我的本地運行一個項目。我已經在我的電腦中安裝了npm和nodejs並嘗試設置該項目。 我第一次運行npm install
時出現了這些問題。 的錯誤信息是:NPM問題:npm ERR!無法解析json npm ERR!沒有數據,空輸入1:1
npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "/usr/bin/nodejs" "/home/aaa/bin/npm" "install"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! file /home/aaa/.npm/asynckit/0.4.0/package/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR!^
npm ERR! File: /home/aaa/.npm/asynckit/0.4.0/package/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
而我的package.json文件是:
```
{
"name": "babel-with-gulp",
"version": "1.0.0",
"description": "Starter code for using Babel with Gulp",
"main": "index.js",
"scripts": {
"test": "jest",
"start": "gulp watch"
},
"author": "Carlos Souza <[email protected]> (http://csouza.me/)",
"license": "ISC",
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/codeschool/babel-with-gulp.git"
},
"keywords": [
"babel",
"gulp",
"es2015"
],
"bugs": {
"url": "https://github.com/codeschool/babel-with-gulp/issues"
},
"homepage": "https://github.com/codeschool/babel-with-gulp#readme",
"devDependencies": {
"babel-core": "^6.7.6",
"babel-jest": "^15.0.0",
"babel-polyfill": "^6.13.0",
"babel-preset-es2015": "^6.14.0",
"babel-preset-react": "^6.11.1",
"babel-preset-stage-1": "^6.13.0",
"babel-register": "^6.7.2",
"babelify": "^7.2.0",
"browser-sync": "^2.11.2",
"browserify": "^12.0.1",
"eslint": "^2.7.0",
"eslint-plugin-react": "^4.2.3",
"exorcist": "^0.4.0",
"gulp": "^3.9.0",
"gulp-eslint": "^2.0.0",
"gulp-if-else": "^1.0.3",
"gulp-imagemin": "^3.0.3",
"gulp-uglify": "^1.5.3",
"jest": "^15.1.1",
"jquery": "^2.2.2",
"react": "^15.0.1",
"react-dom": "^15.0.1",
"react-router": "^2.7.0",
"react-test-renderer": "^15.3.1",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"watchify": "^3.7.0"
},
"dependencies": {
"immutable": "^3.8.1",
"material-ui": "^0.15.4",
"react-addons-css-transition-group": "^15.3.1",
"react-bootstrap": "^0.30.3",
"react-player": "^0.9.0",
"react-redux": "^4.4.5",
"react-tap-event-plugin": "^1.0.0",
"redux": "^3.6.0"
}
}
``` 難道我錯過任何先決條件運行的代碼?還是有任何兼容性問題?我有節點(4.4.5)版本和npm(2.15.5)。