npm在vue中安装错误

时间:2017-12-14 05:47:47

标签: node.js npm vue.js centos

只需按照教程,这就是版本信息。

[root@localhost my-project]# node -v
v6.11.3

[root@localhost my-project]# npm -v
3.10.10

[root@localhost my-project]# vue --version
2.9.2

[root@localhost my-project]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

只需使用easy命令运行,8080端口上没有任何程序运行。

npm install --global vue-cli
vue init webpack my-project
cd my-project
npm install
npm run dev

然后npm安装输出错误,是否意味着它没有完成安装?

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.1 (node_modules/sane/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 3.10.0-229.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.10
npm ERR! file /opt/htdocs/my-project/node_modules/.staging/mocha-nightwatch-2017d835/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected control character at 75:30
npm ERR!     "Diogo Monteiro <diogo.gmtps://github.com/diogogmt)",
npm ERR!                              ^
npm ERR! File: /opt/htdocs/my-project/node_modules/.staging/mocha-nightwatch-2017d835/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!     /opt/htdocs/my-project/npm-debug.log

继续安装,我不知道某些package.json有什么问题,我从不更改安装进度中的任何代码。只需删除目录node_modules并再次运行npm install即可。在日志文件中出现此错误。

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.1 (node_modules/sane/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/babel-generator/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 51:7
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "s
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:       ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-547cad6c/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-reduce-initial/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 30:32
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "John Gozde <john@gozde.ca>
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                                ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-041921dc/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-merge-idents/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected token '\u0000' at 37:44
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Jamie Wong <jamie.lf.wong@gmail.com>",
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                                            ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-9b0e6bda/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-calc/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 41:35
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "djchie <djchie.dev@gmail.com>
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                                   ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-33433b36/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/cssnano/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 53:6
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "including
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:      ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-f9948a11/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-merge-longhand/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 37:12
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Jamie 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:            ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-90819b54/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-merge-rules/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 35:43
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Chris Truter <jeffpalentine@gmail.commail.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                                           ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-c81f99e5/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-convert-values/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected token '\u0000' at 41:3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:   
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:   ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-c4ef212e/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/source-map-support/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 27:33
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Jmeas Smith <jellyes2@gmail
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                                 ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-1ba31f57/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-discard-overridden/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 38:31
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Eddy Bruël <ejpbruel@mozi
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                               ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-a73d7829/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/escodegen/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 49:17
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:   "main": "./sou
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                 ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-fa0ade6a/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-filter-plugins/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 32:41
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Chris Montgomery <christopher.montg
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                                         ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-6667251c/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-discard-duplicates/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 42:30
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Gary Ye <garysye@gmail.c
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                              ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-6dc27f9d/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-discard-empty/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 39:22
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Hawken Rives <ha
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                      ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-2f42160e/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/istanbul-lib-source-maps/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 43:26
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Nicolas Lalevée <ni
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                          ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-0b5539fd/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-minify-gradients/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 32:9
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Chr
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:         ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-6a529f9a/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-normalize-url/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected token '\u0000' at 33:43
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "J. Ryan Stinnett <jryans@gmail.com>",
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                                           ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-4d9551e4/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-svgo/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 29:10
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "azu 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:          ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-59f8c189/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-minify-selectors/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 34:32
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Jack Herrington <jherringt
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                                ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-dd8026aa/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-unique-selectors/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 28:25
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Michael Z Goddard <
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                         ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-9d53ffe4/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-discard-unused/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 40:12
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Gilad 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:            ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-5a8bff21/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-ordered-values/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 33:11
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "J. Ry
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:           ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-67b135eb/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-minify-params/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 35:11
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Chris�=#G�
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:           ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-7d27255f/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-minify-font-values/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 36:29
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Daniel Espeset <daniel@
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                             ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-8d7d0bab/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-normalize-charset/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 31:30
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Adam Kirkton <akirkton@t
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                              ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-95425f09/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: source-map@0.5.7 (node_modules/postcss-zindex/node_modules/source-map):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected token '\u0000' at 66:5
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:   }
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/source-map-e57425b7/package.json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: mocha-nightwatch@3.2.2 (node_modules/mocha-nightwatch):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected control character at 58:18
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:     "Charles Lowe
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:                  ^
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /opt/htdocs/my-project/node_modules/.staging/mocha-nightwatch-2017d835/package.json
npm ERR! Linux 3.10.0-229.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.10
npm ERR! file /opt/htdocs/my-project/node_modules/.staging/arr-flatten-425e9bea/package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Unexpected control character at 52:7
npm ERR!     "r
npm ERR!       ^
npm ERR! File: /opt/htdocs/my-project/node_modules/.staging/arr-flatten-425e9bea/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!     /opt/htdocs/my-project/npm-debug.log

1 个答案:

答案 0 :(得分:0)

看起来你的一个package.json文件已损坏:

private void Button_Click_1(object sender, RoutedEventArgs e){
 string nFilter = "CSV File|*.csv";
 string nTitle = "Save CSV File";
 string newCSVName = newCSVName;

 SaveFileD(nFilter, nTitle, newCSVName);}

当NPM从存储库中获取Mocha-Nightwatch时,丢失的文本Diogo Monteiro <diogo.gmtps://github.com/diogogmt) 已丢失。

我会删除文件ail.com> (ht并再次运行node_modules/.staging/mocha-nightwatch-2017d835/package.json