我有一个安装了节点v13的Ubuntu系统。运行npm start
时,出现以下错误消息:
codex@codeX:~/Documents/frontEnd/bootstrap_Start/Bootstrap4/conFusion$ npm start
> confusion@1.0.0 start /home/codex/Documents/frontEnd/bootstrap_Start/Bootstrap4/conFusion
> npm run watch:all
> confusion@1.0.0 watch:all /home/codex/Documents/frontEnd/bootstrap_Start/Bootstrap4/conFusion
> parallelshell 'npm run watch:scss' 'npm run lite'
child_process.js:429
throw new ERR_INVALID_ARG_TYPE('options.cwd', 'string', options.cwd);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "options.cwd" property must be of type string. Received type function
at normalizeSpawnArguments (child_process.js:429:11)
at spawn (child_process.js:545:13)
at /home/codex/Documents/frontEnd/bootstrap_Start/Bootstrap4/conFusion/node_modules/parallelshell/index.js:104:17
at Array.forEach (<anonymous>)
at Object.<anonymous> (/home/codex/Documents/frontEnd/bootstrap_Start/Bootstrap4/conFusion/node_modules/parallelshell/index.js:100:6)
at Module._compile (internal/modules/cjs/loader.js:1139:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
at Module.load (internal/modules/cjs/loader.js:988:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
code: 'ERR_INVALID_ARG_TYPE'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! confusion@1.0.0 watch:all: `parallelshell 'npm run watch:scss' 'npm run lite'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the confusion@1.0.0 watch:all script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/codex/.npm/_logs/2019-12-27T19_48_03_632Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! confusion@1.0.0 start: `npm run watch:all`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the confusion@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/codex/.npm/_logs/2019-12-27T19_48_03_703Z-debug.log
======================== this is the json file
{
"name": "confusion",
"version": "1.0.0",
"description": "This is a website for Ristorante Con Fusion",
"main": "index.html",
"scripts": {
"start": "npm run watch:all",
"test": "echo \"Error: no test specified\" && exit 1",
"lite": "lite-server",
"scss": "node-sass -o css/ css/",
"watch:scss": "onchange 'css/*.scss' -- npm run scss",
"watch:all": "parallelshell 'npm run watch:scss' 'npm run lite'"
},
"author": "",
"license": "ISC",
"devDependencies": {
"imagemin": "^7.0.1",
"lite-server": "^2.3.0",
"node-sass": "^4.13.0",
"onchange": "^3.3.0",
"parallel": "^1.2.0",
"parallelshell": "^3.0.2"
},
"dependencies": {
"bootstrap": "^4.4.1",
"bootstrap-social": "^5.1.1",
"font-awesome": "^4.7.0",
"jquery": "^3.4.1",
"popper.js": "^1.16.0"
}
}