Are there any fixes to npm run prod fails on build? I would like to add this to ensure what is on the live server is always the production build and avoid forgetting doing that before doing a commit.
However, I get this error, which isn’t happening on my local machine, or other servers which are not through “App”:
Browserslist: caniuse-lite is outdated. Please run the following command: `npm update`
ERROR Failed to compile with 1 errors12:32:00 AM
error in ./resources/js/app.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /workspace/node_modules/@babel/helper-compilation-targets/package.json
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.