I’m new to Roots/Sage, yarn, webpack… and have no idea how to diagnose this problem or even what it means.
I’m getting the error below when I try
yarn build works fine.
$ yarn build:production
yarn run v1.19.1
$ webpack --env.production --progress --config resources/assets/build/webpack.config.js
94% asset optimizationError: The system cannot find the path specified.
at notFoundError ( ( theme_path ) ... \node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT ( ( theme_path ) ... \node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit ( ( theme_path ) ... \node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Any help would be appreciated.
Thanks in advance,
It’s look like the package is damaged.
Go to “\node_modules\cross-spawn” folder through command prompt & install the package by yarn install or npm install based on the tool you use for package management.
Make sure, you don’t use both NPM & YARN in same project for package management. It will damage your packages.
Hope this helps…
Thank you for your reply.
I did as you told me but it didn’t work.
This is the output of ‘yarn install’ in cross-spawn folder, just in case it helps.
Otherwise I’m getting the same message as before when trying
$ yarn install
yarn install v1.19.1
warning eslint > file-entry-cache > flat-cache > firstname.lastname@example.org: CircularJS
ON is in maintenance only, flatted is its successor.
warning mocha > email@example.com: Please use the native JSON object instead of JSON 3
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @firstname.lastname@example.org" has unmet peer dependency "eslint-plug
[4/4] Building fresh packages...
success Saved lockfile.
Done in 7.85s.
node_modules folder, then run
yarn to rebuild.