Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use in a plain Nodejs project #187

Closed
wizevlad opened this issue Sep 15, 2021 · 2 comments
Closed

Can't use in a plain Nodejs project #187

wizevlad opened this issue Sep 15, 2021 · 2 comments

Comments

@wizevlad
Copy link

wizevlad commented Sep 15, 2021

I'm getting this error

 /folder/node_modules/ora/index.js:1
import process from 'node:process';

EDIT:

This error happens on node 10.
On node 12 it works

@sindresorhus
Copy link
Owner

ora/package.json

Lines 15 to 17 in c5026b7

"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},

@xeroxstar
Copy link

Doesn't work on node 12 either, getting same error here when using typescript. Both options wont work:

import ora from 'ora';
let ora = require('ora');
import process from 'node:process';
^^^^^^

SyntaxError: Cannot use import statement outside a module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants