Require is not defined in Playground
See original GitHub issueBug Report
variable
run in server
but error in Playground
should i change my code ?
Environment
OS: OSX 10.12.6 Node/npm version: Node 8.11.2/NPM 6.3.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
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 >require is not defined? Node.js - javascript - Stack Overflow
require() is not a feature that is built into the browser. That is a specific feature of node.js, not of a browser. So,...
Read more >ReferenceError: require is not defined in JavaScript - Stack Diary
The "ReferenceError: require is not defined" error occurs when the require function is used in a JavaScript file that is intended to be ......
Read more >Getting issue in vite/packages/playground/ssr-vue/server.js ...
Describe the bug Getting issue in vite/packages/playground/ssr-vue/server.js ReferenceError: require is not defined I am using Vite, Vue 3, ...
Read more >Use require() to Include External Modules - MongoDB
Require Native Modules; Require Non-Native Modules ... You can use the require() function in your MongoDB Playgrounds to include modules which exist in ......
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 FreeTop 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
Top GitHub Comments
error when defined
variable
outsidePlayground
Unfortunately is not a good practice for webpack put
require
on playground scope, you can read this post to know more about that