-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
@babel/cli v8 does not work #17858
Copy link
Copy link
Labels
Description
💻
- Would you like to work on a fix?
How are you using Babel?
@babel/cli
Input code
n/a
Configuration file name
No response
Configuration
n/a
Current and expected behavior
I'm getting this error:
"file:///home/nic/Documents/dev/github.com/babel/babel-polyfills/node_modules/@babel/cli/bin/babel.js:5
+ const mod = require("module");
+ ^
+
+ ReferenceError: require is not defined in ES module scope, you can use import instead
+ This file is being treated as an ES module because it has a '.js' file extension and '/home/nic/Documents/dev/github.com/babel/babel-polyfills/node_modules/@babel/cli/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
Environment
v8.0.0-rc.2
Possible solution
No response
Additional context
No response
Reactions are currently unavailable