0
を解析できませんでしたばかりインストール私はこれを修正するために助けてくださいノードv6.10.3とNPMのv3.10.10は、私は、このエラー を取得しています窓10にインストールNPMの間にpackage.jsonデータに
を使用しています。私は
npm ERR! npm v3.10.10
npm ERR! file C:\angular2-helloworld\package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected token '\r' at 5:71
npm ERR! "start": "tsc && concurrently \"npm run tsc:w\" \"npm run
lite\"\
npm ERR!
^
npm ERR! File: C:\angular2-helloworld\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.parsenpm ERR! node v6.10.3
package.jsonファイルの内容を取得しています
エラー:その文字はJSONを壊す
"start":"tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
:
{
"name":"angular2-helloworld",
"version":"1.0.0",
"scripts":{
"start":"tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"tsc":"tsc",
"tsc:w":"tsc -w",
"lite":"lite-server",
"typings":"typings",
"postinstall":"typings install"
},
"license":"ISC",
"dependencies":{
"angular2":"2.0.0-beta.14",
"systemjs":"0.19.25",
"es6-shim":"^0.35.0",
"reflect-metadata":"0.1.2",
"rxjs":"5.0.0-beta.2",
"zone.js":"0.6.6"
},
"devDependencies":{
"concurrently":"^2.0.0",
"lite-server":"^2.2.0",
"typescript":"^1.8.9",
"typings":"^0.7.12"
}
}
tscタスクは何ですか?また、なぜあなたの起動スクリプトで 'npm run'なしでtscを起動するのですが、' tsc:w'を 'npm run tsc:w'として起動しますか? –
'\ rはキャリッジリターンを意味します。 NPMは5行目の最後に復帰について苦情を申し立てています。 'package.json'を変更するためにどのテキストエディタを使用していますか? –
私はメモ帳++を使って変更しています –