Require is not defined on vanilla js
See original GitHub issueHi! I’m getting an error while loading the latest version from the vanilla js browser script (https://cdn.jsdelivr.net/npm/superagent):
version: 8.0.1 browser: Edge 105.0.1343.53, Chromium 105.0.5195.125 Console output:
Uncaught ReferenceError: require is not defined
at superagent:1:14164
at superagent:1:269
at superagent:1:274
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:13
Top Results From Across the Web
Javascript require() function giving ReferenceError
By default require() is not a valid function in client side javascript. I recommend you look into require.js as this does extend the...
Read more >How to fix "require is not defined" in JavaScript / Node.js?
In our case, the error message is “require is not defined” which indicates the problem is with the variable or method named “require”....
Read more >Javascript - How to fix ReferenceError: require is not defined
The JavaScript require() function is only available by default in Node.js environment. This means the browser won't know what you mean with the ......
Read more >ReferenceError: require is not defined in JavaScript | bobbyhadz
To solve the "ReferenceError require is not defined" error, remove the type property if it's set to module in your package.json file and...
Read more >How To Fix ReferenceError require is not defined in JavaScript
In this case, check your package.json file for an property called type . If that is set to module , ES6 modules will...
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
Please release
v8.0.0
asv8.0.3
. Less inconvenient for the users,v8.0.3 released to npm 🎉 !!
the issue was tinyify, which bumped common-shakeify, and has a few underlying issues that need resolved before we can upgrade it. apologies for the delay, this wasn’t easy to track down.
https://github.com/visionmedia/superagent/releases/tag/v8.0.3