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.

Uncaught ReferenceError: process is not defined

See original GitHub issue

I have recently upgraded to the following versions

  • “quasar”: “^2.0.0-beta.13”,
  • @quasar/extras”: “^1.10.4”,

Since I have done this I have literally stopped working all the global paths, the .env files, I have not been able to do anything. I’ve been reading the documentation but couldn’t find anything useful, has anyone else had this happen?

If i remove process.env declaration the project will work but that isn’t a option for me right now.

It also happens that the global paths of the images are not working for me (I noticed this when I deleted process env).

Actually import like this: <img :src='${require(src/assets/flags/${language}.png)}'>

image

MY VERSIONS

“node”: “>= 12.22.1”, “npm”: “>= 6.14.2”, “yarn”: “>= 1.21.1”

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
rstoenescucommented, Apr 27, 2021

Ok, writing here for other people who might be reading this thread. The problem was that the devland code was accessing process.env.SOMETHING but SOMETHING was NOT defined in quasar.conf.js > build > env. As a result, process.env.SOMETHING did not get replaced with the actual value so the runtime actually tries to access the process object (which does not exists — it got removed in Webpack 5 anyways).

2reactions
AlexDanielcommented, Nov 6, 2021

@rstoenescu thank you very much for taking the time to leave the comment. I was struggling with the same problem for other reasons, but found this ticket by searching for the error message, and your comment helped me figure out what was wrong (it was just an accidental naming mistake). It saved a lot of time for me, thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Uncaught ReferenceError: process is not defined
Node.js code must be run by the node process, not the browser (the code must run in the server). To run the code,...
Read more >
ReferenceError: “process is not defined” - GIMTEC
In this case, process is not defined in the browser environment, hence the error. The solution is to remove the reference to process...
Read more >
React ReferenceError: process is not defined | bobbyhadz
To solve the "Uncaught ReferenceError: process is not defined" in React, open your terminal in your project's root directory and update the version...
Read more >
"Uncaught ReferenceError: process is not defined" and the ...
The Uncaught ReferenceError: process is not defined happens when when a non-existent (here: process) variable is referenced .
Read more >
process is not defined (NOT react-error-overlay ... - GitHub
Using the optional chaining operator with process ( process?.env ) throws a ReferenceError stating that process is not defined. I originally ...
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