错误:文件“ ./资产/控制器。找不到
在我的主Mac上构建交响乐项目后,我想在MacBook上运行它。
这是我做出的步骤:
- clone github repo
- cd我的项目
- 作曲家安装
- npm install
- npm npm run观看
我想要npm run观看手表
以创建subtest.json
file。
这是我在运行npm运行手表
之后遇到的错误:
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.
没有此文件,我将无法运行项目。
知道为什么我有这个错误吗?
PS:我有节点,git,xcode,交响曲CLI等...已安装和最新。
After building a Symphony project on my main Mac, I wanted to run it on my MacBook.
Here is the steps I made :
- clone GitHub repo
- cd my project
- composer install
- npm install
- npm run watch
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如@vinceamstoutz所建议的那样,
作曲家食谱-O
解决了问题。谢谢 !
As @vinceAmstoutz suggested,
composer recipes -o
solved the problem.Thank you !