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

Broken build on Node v18 #1373

Closed
elenatanasoiu opened this issue Jun 1, 2022 · 3 comments
Closed

Broken build on Node v18 #1373

elenatanasoiu opened this issue Jun 1, 2022 · 3 comments
Assignees
Labels
bug Something isn't working VSCode

Comments

@elenatanasoiu
Copy link
Contributor

elenatanasoiu commented Jun 1, 2022

Description

Building the extension via npm run build breaks on Node v18, but works fine on previous versions.

Full error output:

$ npm run build

> vscode-codeql@1.6.7 build
> gulp

[09:05:19] Requiring external module ts-node/register
[09:05:20] Using gulpfile ~/projects/vscode-codeql/extensions/ql-vscode/gulpfile.ts
[09:05:20] Starting 'default'...
[09:05:20] Starting 'cleanOutput'...
[09:05:20] Finished 'cleanOutput' after 14 ms
[09:05:20] Starting 'compileTypeScript'...
[09:05:20] Starting 'compileTextMateGrammar'...
[09:05:20] Starting 'compileView'...
[09:05:20] Starting 'copyTestData'...
[09:05:20] Starting 'copyViewCss'...
[09:05:20] Finished 'copyTestData' after 205 ms
[09:05:20] Finished 'compileTextMateGrammar' after 318 ms
[09:05:20] Finished 'copyViewCss' after 330 ms
webpack compiled successfully
[09:05:31] Finished 'compileView' after 11 s
[09:05:35] 'compileTypeScript' errored after 15 s
[09:05:35] Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
    at readWasm (/Users/elenatanasoiu/projects/vscode-codeql/extensions/ql-vscode/node_modules/gulp-typescript/node_modules/source-map/lib/read-wasm.js:8:13)
    at wasm (/Users/elenatanasoiu/projects/vscode-codeql/extensions/ql-vscode/node_modules/gulp-typescript/node_modules/source-map/lib/wasm.js:25:16)
    at /Users/elenatanasoiu/projects/vscode-codeql/extensions/ql-vscode/node_modules/gulp-typescript/node_modules/source-map/lib/source-map-consumer.js:264:14
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
[09:05:35] 'default' errored after 15 s

To reproduce

cd extensions/ql-vscode
nvm install 18
nvm use 18
npm install
npm run build

Expected behavior
The build command should complete without errors.

Additional context
This passes in codespaces as a codespace currently defaults to v16. Discovered while working on #1369

@elenatanasoiu elenatanasoiu added the bug Something isn't working label Jun 1, 2022
@github-actions github-actions bot added the VSCode label Jun 1, 2022
@elenatanasoiu elenatanasoiu added the good first issue Good for newcomers label Jun 1, 2022
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], we want to stay in sync with the current
node version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to
the preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently
fails in Node v18. [3]

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], we want to stay in sync with the current
node version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to
the preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently
fails in Node v18. [3]

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], we want to stay in sync with the current
node version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to
the preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently
fails in Node v18. [3]

We're also updating the docs to mention using `nvm` to manage node
versions.

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], we want to stay in sync with the current
node version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to
the preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently
fails in Node v18. [3]

We're also updating the docs to mention using `nvm` to manage node
versions.

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], we want to stay in sync with the current node
version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to the
preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently fails in
Node v18. [3]

We're also updating the docs to mention using `nvm` to manage node
versions.

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], we want to stay in sync with the current node
version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to the
preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently fails in
Node v18. [3]

We're also updating the docs to mention using `nvm` to manage node
versions.

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version [shipped with VSCode](https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2)  (v16.13.0).

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions.
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version shipped with
VSCode (v16.13.0): https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2).

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions.
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version shipped with
VSCode (v16.13.0):

https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2.

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions.
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version shipped with
VSCode (v16.13.0):

https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions.
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version shipped with
VSCode (v16.13.0):

https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions and point to the right place to check for current supported versions.
elenatanasoiu added a commit that referenced this issue Jun 1, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
@aeisenberg
Copy link
Contributor

Cause of this error is mozilla/source-map#454, which is a dependency of source-map-support. The fix for this error already exists, but it is not in a released version yet.

@aeisenberg aeisenberg self-assigned this Jun 4, 2022
elenatanasoiu added a commit that referenced this issue Jun 13, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version shipped with
VSCode (v16.13.0):

https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions and point to the right place to check for current supported versions.
elenatanasoiu added a commit that referenced this issue Jun 13, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
@aeisenberg aeisenberg removed the good first issue Good for newcomers label Jun 13, 2022
@aeisenberg
Copy link
Contributor

aeisenberg commented Jun 13, 2022

As mentioned in #1378, there's no rush right now to get this fixed, but we do need to address this before vscode releases a version that ships with node 18, which is likely to be in a few months.

@elenatanasoiu
Copy link
Contributor Author

This is addressed in #1387

@elenatanasoiu elenatanasoiu self-assigned this Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working VSCode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants