错误:文件“ ./资产/控制器。找不到

发布于 2025-02-06 15:28:49 字数 1707 浏览 2 评论 0原文

在我的主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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何必那么矫情 2025-02-13 15:28:49

正如@vinceamstoutz所建议的那样,作曲家食谱-O解决了问题。

谢谢 !

As @vinceAmstoutz suggested, composer recipes -o solved the problem.

Thank you !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文