I am attempting to include a new script in the package.json file under the scripts section. For instance, I have the following:
{
"scripts": {
"delete": "rm -f wwwroot/*.js wwwroot/*.css wwwroot/*.html wwwroot/*.map"
"watch": "npm run delete; parcel watch Client/index.html --out-dir wwwroot"
}
}
However, when I execute npm run watch
, an error is displayed in the terminal:
> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="abdbd9c4c1cec8dfe5cac6ceeb9a859b859b">[email protected]</a> watch C:\Users\username\userProjectName\path\ProjectName
> npm run delete; parcel watch Client/index.html --out-dir wwwroot
npm ERR! missing script: delete;
npm ERR!
npm ERR! Did you mean this?
npm ERR! delete
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\username\AppData\Roaming\npm-cache\_logs\2019-05-01T17_17_44_173Z-debug.lognpm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4535372a2f2026310b24282005746b756b75">[email protected]</a> watch: `npm run delete; parcel watch Client/index.html --out-dir wwwroot`
npm ERR! Exit status 1npm ERR!
npm ERR! Failed at the <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b4c4c6dbded1d7c0fad5d9d1f4859a849a84">[email protected]</a> watch 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\username\AppData\Roaming\npm-cache\_logs\2019-05-01T17_17_44_193Z-debug.log
Nevertheless, executing it manually by typing into the terminal:
npm run delete; parcel watch Client/index.html --out-dir wwwroot
, works as expected.