在我的package.json文件中,我具有以下脚本:
"scripts": {
"start": "npm run watch:all",
"test": "echo \"Error: no test specified\" && exit 1",
"lite": "lite-server",
"sass": "node-sass -o sass/ css/",
"watch:sass": "onchange 'sass/*.scss' -- npm run sass",
"watch:all": "parallelshell 'npm run watch:sass' 'npm run lite'"
}
Run Code Online (Sandbox Code Playgroud)
每当我运行代码时,我都会收到以下错误消息:
crs@1.0.0 start /home/hazem/crs
> npm run watch:all
> crs@1.0.0 watch:all /home/hazem/crs
> parallelshell 'npm run watch:sass' 'npm run lite'
child_process.js:422
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 …Run Code Online (Sandbox Code Playgroud)