I was trying to run npm lite server and onchange for scss together as described in my course but instead got an error... Tried Running npm start with package.json containing script as -
"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\""
}
Instead of working properly, I got the following error -
> confusion@1.0.0 start F:\Courses\Full-Stack Web Development\Bootstrap4\conFusion
> npm run watch:all
> confusion@1.0.0 watch:all F:\Courses\Full-Stack Web Development\Bootstrap4\conFusion
> parallelshell "npm run watch:scss" "npm run lite"
child_process.js:430
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 function wrappedCwd
at normalizeSpawnArguments (child_process.js:430:11)
at spawn (child_process.js:546:13)
at F:\Courses\Full-Stack Web Development\Bootstrap4\conFusion\node_modules\parallelshell\index.js:104:17
at Array.forEach (<anonymous>)
at Object.<anonymous> (F:\Courses\Full-Stack Web Development\Bootstrap4\conFusion\node_modules\parallelshell\index.js:100:6)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929: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! C:\Users\Ankur\AppData\Roaming\npm-cache\_logs\2020-05-27T07_16_54_990Z-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! C:\Users\Ankur\AppData\Roaming\npm-cache\_logs\2020-05-27T07_16_55_176Z-debug.log
How to remove this error..?