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

SyntaxError : Unexpected token '?' on Ubuntu 22.04 #1495

Closed
NonneTrapuE opened this issue Jan 22, 2024 · 1 comment
Closed

SyntaxError : Unexpected token '?' on Ubuntu 22.04 #1495

NonneTrapuE opened this issue Jan 22, 2024 · 1 comment

Comments

@NonneTrapuE
Copy link

Hi.

I encounter an issue when i launch json-server in Ubuntu 22.04.
I install with NPM

npm install -g json-server

And i have this error :

file:///usr/local/lib/node_modules/json-server/lib/bin.js:32
default: process.env['PORT'] ?? '3000',
^

SyntaxError: Unexpected token '?'
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)

Same error when i use npx. But, with same method, i installed and use json-server in Rocky Linux 9.

Have an idea ?

Thanks !

@NonneTrapuE
Copy link
Author

Not good NodeJS version, my bad

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

1 participant