2016-07-20 4 views
0

npm init을 실행 한 후 npm 패키지를 설치하려고하면이 응답이 표시됩니다.패키지를 설치할 때 npm과 EJSONPARSE 오류가 발생했습니다.

C:\Users\User\My Documents\brackets\2007webpackes6>npm install --save-dev babel-core 
npm WARN package.json [email protected] No description 
npm WARN package.json [email protected] No repository field. 
npm WARN package.json [email protected] No README data 
npm ERR! Windows_NT 6.3.9600 
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save-dev" "babel-core" 
npm ERR! node v0.12.7 
npm ERR! npm v2.11.3 
npm ERR! file C:\Users\User\AppData\Roaming\npm-cache\babel-runtime\6.9.2\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: C:\Users\User\AppData\Roaming\npm-cache\babel-runtime\6.9.2\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 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\Users\User\My Documents\brackets\2007webpackes6\npm-debug.log 

오류 보고서는 거기에 "package.json"에 데이터가 없다하지만 파일을 열 때이 있다고 말하고있다.

Package.json는 :

{ 
    "name": "2007webpackes6", 
    "version": "1.0.0", 
    "description": "", 
    "main": "index.js", 
    "scripts": { 
    "test": "echo \"Error: no test specified\" && exit 1" 
    }, 
    "author": "", 
    "license": "ISC" 
} 

어떤 도움이 많이 주시면 감사하겠습니다.

답변

1

오늘은 같은 문제가있었습니다. 나는 자식 배쉬를 사용했다. 내가 창문을 가진 cmd를 시도했을 때 그것은 잘 작동했다. 이제 오류가 발생하는 이유는 알 수 없지만 제대로 작동하는지 확인할 수 있습니다.

0

Cordova를 설치하려고 할 때 동일한 오류가 발생했습니다. "npm cache clean"을 시도하십시오.

관련 문제