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

I keep getting Error: Cannot find module 'node-pty/build/Release/spawn-helper' when trying to build blueprint browser in WSL #300

Open
KarthikHebbarMN opened this issue Sep 11, 2023 · 1 comment

Comments

@KarthikHebbarMN
Copy link

Error: Cannot find module 'node-pty/build/Release/spawn-helper'
Require stack:

Error: Cannot find module 'node-pty/build/Release/spawn-helper'
Require stack:
- /mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/@theia/native-webpack-plugin/lib/native-webpack-plugin.js
- /mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/@theia/native-webpack-plugin/lib/index.js
- /mnt/d/Work/experiments/theia-bp-test/theia-blueprint/applications/browser/gen-webpack.node.config.js
- /mnt/d/Work/experiments/theia-bp-test/theia-blueprint/applications/browser/webpack.config.js
- /mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/webpack-cli/lib/webpack-cli.js
- /mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/webpack-cli/lib/bootstrap.js
- /mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/webpack-cli/bin/cli.js
- /mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/webpack/bin/webpack.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Function.resolve (/mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/v8-compile-cache/v8-compile-cache.js:164:23)
    at NativeWebpackPlugin.copyNodePtySpawnHelper (/mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/@theia/native-webpack-plugin/lib/native-webpack-plugin.js:107:40)
    at /mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/@theia/native-webpack-plugin/lib/native-webpack-plugin.js:82:28 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/@theia/native-webpack-plugin/lib/native-webpack-plugin.js',
    '/mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/@theia/native-webpack-plugin/lib/index.js',
    '/mnt/d/Work/experiments/theia-bp-test/theia-blueprint/applications/browser/gen-webpack.node.config.js',
    '/mnt/d/Work/experiments/theia-bp-test/theia-blueprint/applications/browser/webpack.config.js',
    '/mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/webpack-cli/lib/webpack-cli.js',
    '/mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/webpack-cli/lib/bootstrap.js',
    '/mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/webpack-cli/bin/cli.js',
    '/mnt/d/Work/experiments/theia-bp-test/theia-blueprint/node_modules/webpack/bin/webpack.js'
  ]
}

Steps I followed are

  1. yarn
  2. yarn build:extensions && yarn download:plugins
  3. yarn browser build

Tried fixing it by doing
npm i node-pty

The same build works in Docker,
I am trying to build locally to see why custom vs extensions are not loading,
they used to load in previous version but dont in the latest. I'll create separate issue for that ticket.

@KarthikHebbarMN
Copy link
Author

Tried with node 16.20.2 as well.
A prior step I did, to help with anything is npm i -g make. Because I got an npm error, make module not found.
From then on I just retraced steps of that in docker file

 yarn --pure-lockfile && \
    yarn build:extensions && \
    yarn download:plugins && \
    yarn browser build

@KarthikHebbarMN KarthikHebbarMN changed the title I keep getting this error when trying to build blueprint browser in WSL I keep getting Error: Cannot find module 'node-pty/build/Release/spawn-helper' when trying to build blueprint browser in WSL Sep 12, 2023
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