question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Erreur de la commande npm run build

See original GitHub issue

Quand 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:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
julaudocommented, Nov 1, 2020

La variable est utilisée pour le paramètre --public-url de parcel, c’est pour cela qu’elle est nommé ainsi

0reactions
gjgdcommented, Nov 1, 2020

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 fichier index.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 !

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found