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' when not using npm

See original GitHub issue

I use interact.js from jsDelivr as such:

<script src="https://cdn.jsdelivr.net/npm/interactjs/dist/interact.min.js"></script>

I don’t use npm and it was working fine.

Now I get the error:

Uncaught ReferenceError: process is not defined

It seems this error is fairly recent. I’ve tested different versions and it seems it was introduced in 1.10.6. Rolling back to 1.10.5 with

<script src="https://cdn.jsdelivr.net/npm/interactjs@1.10.5/dist/interact.min.js"></script>

solves the issue

Seems the problem is coming from line 101 of InteractStatic.ts:

interact.version = process.env.npm_package_version

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tayecommented, Mar 4, 2021

Should be fixed now for v1.10.7

0reactions
Zeffurocommented, Mar 4, 2021

Same issue going back to previous version for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Uncaught ReferenceError: process is not defined
I am using the command "npm start" which refers to the "start" script inside package.json that is set to "start": "http-server -a localhost...
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 >
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 >
"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 >

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