eclipse-theia / theia-blueprint

The Eclipse IDE is a modern and open IDE for cloud and desktop. The Theia IDE is based on the Theia platform. The Theia IDE is available as a downloadable desktop application. You can also try the latest version of the Theia IDE online. For more details, see the Readme below.
https://theia-ide.org/#theiaide
MIT License
335 stars 126 forks source link

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 12 months ago

KarthikHebbarMN commented 12 months ago

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 commented 12 months ago

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