You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I launch the command npm run build, I get the following error:
`[xxx@serveur tag]$ /home/xxx/nodevenv/public_html/xxx/16/bin/npm run build
build
encore production --progress
Running webpack ...
99% done plugins FriendlyErrorsWebpackPlugin ERROR Failed to compile with 1 errors 12:44:04
error in ./assets/controllers.json 12:44:04
Module build failed (from ../../nodevenv/public_html/xxx/16/lib/node_modules/@symfony/stimulus-bridge/dist/webpack/loader.js):
Error: The file "@symfony/ux-chartjs/package.json" could not be found. Try running "yarn install --force".
at createControllersModule (/home/xxx/nodevenv/public_html/xxx/16/lib/node_modules/@symfony/stimulus-bridge/dist/webpack/loader.js:46:19)
at Object.loader (/home/xxx/nodevenv/public_html/xxx/16/lib/node_modules/@symfony/stimulus-bridge/dist/webpack/loader.js:106:43)
from /vendor/symfony/ux-charts copy "assets" folder to node_modules/@symfony and rename it "ux-chartjs"
open node_modules/@symfony/ux-chartjs in terminal
run npm install
from within node_modules/chart.js/dist copy chart.js to node_modules/@symfony/ux-chartjs/assets
now you can compile your JS
PS if you run another symfony UX install like composer require symfony/ux-cropperjs it will override your changes... its not real solution just get you going until it resolved correctly.
Hi,
When I launch the command
npm run build
, I get the following error:`[xxx@serveur tag]$ /home/xxx/nodevenv/public_html/xxx/16/bin/npm run build
Running webpack ...
99% done plugins FriendlyErrorsWebpackPlugin ERROR Failed to compile with 1 errors 12:44:04
error in ./assets/controllers.json 12:44:04
Module build failed (from ../../nodevenv/public_html/xxx/16/lib/node_modules/@symfony/stimulus-bridge/dist/webpack/loader.js):
Error: The file "@symfony/ux-chartjs/package.json" could not be found. Try running "yarn install --force".
at createControllersModule (/home/xxx/nodevenv/public_html/xxx/16/lib/node_modules/@symfony/stimulus-bridge/dist/webpack/loader.js:46:19)
at Object.loader (/home/xxx/nodevenv/public_html/xxx/16/lib/node_modules/@symfony/stimulus-bridge/dist/webpack/loader.js:106:43)
Entrypoint app = runtime.9a71ee5d.js 842.cb9a3ca0.js app.97de1fbb.css app.0095513b.js 7 auxiliary assets
webpack compiled with 1 error`
Indeed, I don't have the package.json file in the directory ux-chartjs.
Here is my package.json:
{ "devDependencies": { "@hotwired/stimulus": "^3.0.0", "@popperjs/core": "^2.11.0", "@symfony/stimulus-bridge": "^3.2.0", "@symfony/stimulus-bundle": "file:vendor/symfony/stimulus-bundle/assets", "@symfony/ux-chartjs": "file:vendor/symfony/ux-chartjs/assets", "@symfony/webpack-encore": "^1.7.0", "bootstrap": "^5.1.3", "chart.js": "^3.4.1", "core-js": "^3.20.0", "jquery": "^3.6.0", "regenerator-runtime": "^0.13.2", "sass": "^1.45.0", "sass-loader": "^12.4.0", "webpack-notifier": "^1.15.0" }, "license": "UNLICENSED", "private": true, "scripts": { "dev-server": "encore dev-server", "dev": "encore dev", "watch": "encore dev --watch", "build": "encore production --progress" }, "dependencies": { "@babel/plugin-proposal-class-properties": "^7.18.6" } }
Thank you,
Clara.
The text was updated successfully, but these errors were encountered: