Я использую parcel и хочу очистить папку .cache, а также запустить React frontend на 3000 и одновременно запустить backend на 1234. Это мои стартовые скрипты.
"scripts": {
"test": "jest --watchAll",
"start": "npm run build-client && node index.js",
"dev": "npm run dev-client & nodemon index.js",
"dev-peer": "cross-env GENERATE_PEER_PORT='true' nodemon index.js",
"build-client": "npm run clean && parcel build client/src/index.html --out-dir client/dist",
"dev-client": "npm run clean && parcel client/src/index.html --out-dir client/dist",
"clean": "rmdir /s/q .cache client/dist"
},
Я уже поместил команды windows в «чистый» скрипт с rmdir /s/q
, но получил
Invalid switch - "dist".
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ajax27-blockchain@1.0.0 clean: `rmdir /s/q .cache client/dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ajax27-blockchain@1.0.0 clean 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\shaun\AppData\Roaming\npm-cache\_logs\2019-07-09T11_49_08_194Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ajax27-blockchain@1.0.0 dev-client: `npm run clean && parcel client/src/index.html --out-dir client/dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ajax27-blockchain@1.0.0 dev-client 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\shaun\AppData\Roaming\npm-cache\_logs\2019-07-09T11_49_08_223Z-debug.log