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 'export' with node v13.6.0 #6465

Closed
rchod opened this issue Feb 22, 2021 · 8 comments
Closed

SyntaxError: Unexpected token 'export' with node v13.6.0 #6465

rchod opened this issue Feb 22, 2021 · 8 comments
Labels
needs triage This issue has not been looked into

Comments

@rchod
Copy link

rchod commented Feb 22, 2021

> nest start

/home/nest-todo/node_modules/uuid/dist/esm-browser/index.js:1
export { default as v1 } from './v1.js';
^^^^^^

SyntaxError: Unexpected token 'export'
    at wrapSafe (internal/modules/cjs/loader.js:1060:16)
    at Module._compile (internal/modules/cjs/loader.js:1108:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)
    at Module.load (internal/modules/cjs/loader.js:993:32)
    at Function.Module._load (internal/modules/cjs/loader.js:892:14)
    at Module.require (internal/modules/cjs/loader.js:1033:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/home/nest-todo/node_modules/@nestjs/common/decorators/core/injectable.decorator.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1144:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)

I had to switch to node v14.2.0 to fix this issue

@rchod rchod added the needs triage This issue has not been looked into label Feb 22, 2021
@jmcdo29
Copy link
Member

jmcdo29 commented Feb 22, 2021

Please provide a minimum reproduction. Also node 13 is an experimental/unstable version. 12 and 14 are the stable, production ready versions you should be using

@rchod
Copy link
Author

rchod commented Feb 22, 2021

Yes, I switched to v14, I didn't know uuid doesn't support node v13 .

One reading the NestJs docs:

Prerequisites#
Please make sure that Node.js (>= 10.13.0) is installed on your operating system.

might think that all versions of node >= 10.13.0 are supported. (maybe include a phrase to say that only stable node versions are supported ?)

@jmcdo29
Copy link
Member

jmcdo29 commented Feb 22, 2021

We can make an update to the docs that says > 10.13.0 and LTS (so 10, 12, 14)

@rchod
Copy link
Author

rchod commented Feb 22, 2021

Yes, that would more clear, thanks.

@rubiin
Copy link
Contributor

rubiin commented Feb 22, 2021

That would be a nice addition to docs and might prevent future issues of this sort

@jmcdo29
Copy link
Member

jmcdo29 commented Feb 22, 2021

Someone want to make a PR for that?

@rchod
Copy link
Author

rchod commented Feb 22, 2021

I made this one nestjs/docs.nestjs.com#1794 please tell me If my phrasing needs improvement

@kamilmysliwiec
Copy link
Member

Let's track this here nestjs/docs.nestjs.com#1794

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has not been looked into
Projects
None yet
Development

No branches or pull requests

4 participants