After building a Symphony project on my main Mac, I wanted to run it on my MacBook.
Here is the steps I made :
I wanted to npm run watch
to create the manifest.json
file.
Here is the error I get after running npm run watch
:
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
johanbrazillier@johans-macbook-air laboutiquefr % yarn build
yarn run v1.22.18
$ encore production --progress
Running webpack ...
Error: File "./assets/controllers.json" could not be found.
- WebpackConfig.js:674 WebpackConfig.enableStimulusBridge
[laboutiquefr]/[@symfony]/webpack-encore/lib/WebpackConfig.js:674:19
- index.js:1030 Encore.enableStimulusBridge
[laboutiquefr]/[@symfony]/webpack-encore/index.js:1030:23
- EncoreProxy.js:51 Proxy.minDistance
[laboutiquefr]/[@symfony]/webpack-encore/lib/EncoreProxy.js:51:53
- webpack.config.js:26 Object.<anonymous>
/Applications/MAMP/htdocs/laboutiquefr/webpack.config.js:26:6
- loader:1105 Module._compile
node:internal/modules/cjs/loader:1105:14
- loader:1159 Module._extensions..js
node:internal/modules/cjs/loader:1159:10
- loader:981 Module.load
node:internal/modules/cjs/loader:981:32
- loader:827 Module._load
node:internal/modules/cjs/loader:827:12
- loader:1005 Module.require
node:internal/modules/cjs/loader:1005:19
- helpers:102 require
node:internal/modules/cjs/helpers:102:18
error Command failed with exit code 1.
Without this file, I can't run my project.
Any idea why I have this error ?
PS : I have Node, Git, Xcode, Symphony CLI, etc... installed and up to date.
As @vinceAmstoutz suggested, composer recipes -o
solved the problem.
Thank you !