I have installed a fresh Sitecore 9.2 install and I'm trying to deploy an existing react solution to my local. When I run the npm build task I get the following error.
> my-sitecore-site@1.2.0 build:client C:\dev\sites\my-sitecore-site
> cross-env-shell NODE_ENV=${NODE_ENV:-develop} PUBLIC_URL=$npm_package_config_sitecoreDistPath "craco build" && node ./build-client.js
The system cannot find the path specified.
events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn Files\Git\dist\my-sitecore-site ENOENT
at notFoundError (C:\dev\sites\my-sitecore-site\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\dev\sites\my-sitecore-site\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (C:\dev\sites\my-sitecore-site\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.cp.emit (C:\dev\sites\my-sitecore-site\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:30:37)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn Files\\Git\\dist\\my-sitecore-site',
path: 'Files\\Git\\dist\\my-sitecore-site',
spawnargs: [ 'craco build' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-sitecore-site@1.2.0 build:client: `cross-env-shell NODE_ENV=${NODE_ENV:-develop} PUBLIC_URL=$npm_package_config_sitecoreDistPath "craco build" && node ./build-client.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-sitecore-site@1.2.0 build: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\my-user\AppData\Roaming\npm-cache\_logs\2021-04-01T14_27_37_138Z-debug.log
ERROR: "build:client" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-sitecore-site@1.2.0 build: `npm-run-all --serial bootstrap:connected build:client build:server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-sitecore-site@1.2.0 build 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\my-user\AppData\Roaming\npm-cache\_logs\2021-04-01T14_27_37_222Z-debug.log
It looks like it has some issues with this npm task
"build": "npm-run-all --serial bootstrap:connected build:client build:server",
and it fails on build:client
.
If I run npm run build:client
individually on its own it works, but when I run npm-run-all --serial bootstrap:connected build:client build:server
it fails and gives me the error above.
Any help is appreciated.
Thanks!