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

[turbopack] Document Node 16 Min Requirement and Fail on using less than node 16 #2336

Closed
TheLarkInn opened this issue Oct 25, 2022 · 4 comments · May be fixed by #2466
Closed

[turbopack] Document Node 16 Min Requirement and Fail on using less than node 16 #2336

TheLarkInn opened this issue Oct 25, 2022 · 4 comments · May be fixed by #2466
Labels
area: docs Improvements or additions to documentation kind: bug Something isn't working owned-by: turbopack

Comments

@TheLarkInn
Copy link

TheLarkInn commented Oct 25, 2022

What version of Turborepo are you using?

Alpha

What package manager are you using / does the bug impact?

npm

What operating system are you using?

Windows

Describe the Bug

If you accidentally use a version less than node 16 for the new turbopack demo you get some confusing error messages.

event - initial compilation 6.668ms
\\?\C:\Users\selarkin\Code\turbopack-demo\turbopack-demo\.next\server\app\chunks\ssr\node_modules_next_dist_f441f7.js:12539
                    this[r][E] ??= new Map([
                               ^^^

SyntaxError: Unexpected token '??='
    at wrapSafe (internal/modules/cjs/loader.js:1001:16)
    at Module._compile (internal/modules/cjs/loader.js:1049:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (\\?\C:\Users\selarkin\Code\turbopack-demo\turbopack-demo\.next\server\app\index.js:8:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
    at internal/main/run_main_module.js:17:47

Expected Behavior

Just fail or error out on non-support node version so unhelpful error messages don't surface to users.

To Reproduce

Follow the steps to install turbopack quickstart:

https://turbo.build/pack/docs#quickstart

Reproduction Repo

https://turbo.build/pack/docs#quickstart

@TheLarkInn TheLarkInn added the kind: bug Something isn't working label Oct 25, 2022
@mehulkar mehulkar added the area: docs Improvements or additions to documentation label Oct 25, 2022
@TheLarkInn
Copy link
Author

Just to clarify @mehulkar the tool should in addition to having docs about its minimum supported node version, also fail if the minimum supported node version is not used.

@mehulkar mehulkar changed the title [turborepo] Document Node 16 Min Requirement or Fail on using less than node 16 [turborepo] Document Node 16 Min Requirement and Fail on using less than node 16 Oct 25, 2022
@jtlapp
Copy link

jtlapp commented Mar 14, 2023

Some of the example monorepos use tsup, which currently requires Node >= v18.

@GarryOne
Copy link

My project was failing completely to start with Turbopack using Node v16.

I was getting:

failed to convert header to a str

Debug info:
- Execution of resolve_source_request failed
- failed to convert header to a str

With v18.16.0 works fine.

@anthonyshew anthonyshew changed the title [turborepo] Document Node 16 Min Requirement and Fail on using less than node 16 [turbopack] Document Node 16 Min Requirement and Fail on using less than node 16 Dec 6, 2023
@timneutkens
Copy link
Member

Next.js requires Node.js 18 on the latest version so this issue is no longer relevant. Going to close it 🙏 Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Improvements or additions to documentation kind: bug Something isn't working owned-by: turbopack
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants