我正在运行Windows10。我有一个Seagate PersonalCloud,我在其中存储了所有Web开发代码,因为我并不总是在同一台计算机上。我通常使用S-Drive访问此代码。在需要节点时,我很少遇到除以外的任何问题。
运行命令“ npm install”和“ npm install live-server -g”可获得所需的结果消息。但是,当我运行“ npm start”时,它将启动Web服务器,直到我更改代码。 (我只用非常简单的html代码尝试过,但结果相同。)
现在,如果我将文件复制到本地驱动器并按照相同的步骤进行,那么一切正常。
我是否可能缺少某些特殊设置?我使用了Windows的基本安装包。
预先感谢, 仁
更新:这是错误消息:
Serving "S:\PersonalCloud\jennylynneh\web development\learnkey\MTA HTML5 App Dev Fundamentals (Exam 98-375)\unraveling_html5_css_javascript\Chapter01\Exercise-01-01" at http://127.0.0.1:58680
Ready for changes
GET /favicon.ico 404 283.349 ms - 150
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! unraveling-html5-2nd-edition@1.0.0 start: `live-server --port=0`
npm ERR! Exit status 3221225477
npm ERR!
npm ERR! Failed at the unraveling-html5-2nd-edition@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jlhar\AppData\Roaming\npm-cache\_logs\2018-11-27T20_03_21_298Z-debug.log /c/Program Files/nodejs/npm: line 34: 15668 Segmentation fault "$NODE_EXE" "$NPM_CLI_JS" "$@"
使用npm install live-server --only=dev
我得到:
npm ERR! file S:\PersonalCloud\jennylynneh\web development\learnkey\MTA HTML5 App Dev Fundamentals (Exam 98-375)\unraveling_html5_css_javascript\Chapter02\Exercise-02-17\package.json
npm ERR! code EJSONPARSE
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token in JSON at position 299 while parsing near '... "license": "ISC", [ % x % X ...'i
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.