Erreur de la commande npm run build
See original GitHub issueQuand je lance la commande npm run build
ou npm run build:simple
j’obtiens une erreur car PUBLIC_URL n’est pas définie.
Quelle est la bonne manière de définir PUBLIC_URL ?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
The command "npm run build -- --prod" exited with code 1 error
For passing an argument to build command: change 'npm run build -- --prod' to 'npm run build --prod' in the . · Open...
Read more >Command failed with exit code 1: npm run build - Netlify fix 2020
Udemy Courses: - 9 React Projects on Udemy - https://bit.ly/2D83M8c - 9 React Projects on Gumroad - https://h3webdevtuts.gumroad.com/ l /oOgYi ...
Read more >npm run build throws error #3420 - vuejs/vue-cli - GitHub
According to the package-lock.json , you have terser 3.16.0 installed. This problem has been addressed in this issue #3407 So please delete ...
Read more >Error MSB3073 The command npm run build exited with code ...
Hi Shakara Abbott,. The error often means that the npm.exe cannot be found. Please try to download the npm tool, and then add...
Read more >"npm build / npm run build" shows error : r/reactjs - Reddit
Error i'm getting: 'run-script' is not recognized as an internal or external command,. operable program or batch file. npm ERR! code ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
La variable est utilisée pour le paramètre --public-url de parcel, c’est pour cela qu’elle est nommé ainsi
Merci @theblackhole c’est très clair! Donc je suppose qu’en prod ils doivent lancer une commande non définie dans package.json qui set PUBLIC_URL.
Sinon en regardant où cette variable est utilisée dans le code, il me semble qu’elle devrait plutôt être nommée
URL_PATH
. Voyez le fichierindex.html
: https://github.com/LAB-MI/attestation-deplacement-derogatoire-q4-2020/blob/main/src/index.html#L18 Il semble que la variable définit la partie “path” de l’URL, ‘/deplacement-covid-19’ dans le cas de la prod.Du coup dans ton exemple @theblackhole PUBLIC_URL devrait être set à
/
non ?Je ferme l’issue car j’ai obtenu la réponse à ma question, merci !