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

No prebuild or local build of @parcel/watcher found #1808

Closed
lemonCMS opened this issue Jul 5, 2023 · 20 comments
Closed

No prebuild or local build of @parcel/watcher found #1808

lemonCMS opened this issue Jul 5, 2023 · 20 comments
Labels
type: bug Something isn't working

Comments

@lemonCMS
Copy link

lemonCMS commented Jul 5, 2023

service initializing failes

To have a working nx console

Steps to Reproduce

create a new workspace

npx create-nx-workspace@latest

Failure Logs

c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\node_modules\@parcel\watcher\index.js:25
      throw new Error(`No prebuild or local build of @parcel/watcher found. Tried ${name}. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.`);
      ^

Error: No prebuild or local build of @parcel/watcher found. Tried @parcel/watcher-win32-ia32. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.
    at Object.<anonymous> (c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\node_modules\@parcel\watcher\index.js:25:13)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1243:10)
    at Module.load (node:internal/modules/cjs/loader:1058:32)
    at Module._load (node:internal/modules/cjs/loader:893:12)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1082:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\nxls\main.js:775:21404)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
[Info  - 10:07:17 PM] Connection to server got closed. Server will restart.
[Error - 10:07:17 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:17 PM] Nx Console Client client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:17 PM] Sending request nx/workspace failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:17 PM] Sending request nx/workspace failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:17 PM] Sending request nx/version failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:17 PM] Sending request nx/workspace failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\node_modules\@parcel\watcher\index.js:25
      throw new Error(`No prebuild or local build of @parcel/watcher found. Tried ${name}. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.`);
      ^

Error: No prebuild or local build of @parcel/watcher found. Tried @parcel/watcher-win32-ia32. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.
    at Object.<anonymous> (c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\node_modules\@parcel\watcher\index.js:25:13)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1243:10)
    at Module.load (node:internal/modules/cjs/loader:1058:32)
    at Module._load (node:internal/modules/cjs/loader:893:12)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1082:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\nxls\main.js:775:21404)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
[Info  - 10:07:17 PM] Connection to server got closed. Server will restart.
[Error - 10:07:17 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:17 PM] Nx Console Client client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\node_modules\@parcel\watcher\index.js:25
      throw new Error(`No prebuild or local build of @parcel/watcher found. Tried ${name}. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.`);
      ^

Error: No prebuild or local build of @parcel/watcher found. Tried @parcel/watcher-win32-ia32. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.
    at Object.<anonymous> (c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\node_modules\@parcel\watcher\index.js:25:13)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1243:10)
    at Module.load (node:internal/modules/cjs/loader:1058:32)
    at Module._load (node:internal/modules/cjs/loader:893:12)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1082:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\nxls\main.js:775:21404)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
[Info  - 10:07:18 PM] Connection to server got closed. Server will restart.
[Error - 10:07:18 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:18 PM] Nx Console Client client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:18 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\node_modules\@parcel\watcher\index.js:25
      throw new Error(`No prebuild or local build of @parcel/watcher found. Tried ${name}. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.`);
      ^

Error: No prebuild or local build of @parcel/watcher found. Tried @parcel/watcher-win32-ia32. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.
    at Object.<anonymous> (c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\node_modules\@parcel\watcher\index.js:25:13)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1243:10)
    at Module.load (node:internal/modules/cjs/loader:1058:32)
    at Module._load (node:internal/modules/cjs/loader:893:12)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1082:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\nxls\main.js:775:21404)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
[Info  - 10:07:18 PM] Connection to server got closed. Server will restart.
[Error - 10:07:18 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:18 PM] Nx Console Client client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:18 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\node_modules\@parcel\watcher\index.js:25
      throw new Error(`No prebuild or local build of @parcel/watcher found. Tried ${name}. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.`);
      ^

Error: No prebuild or local build of @parcel/watcher found. Tried @parcel/watcher-win32-ia32. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.
    at Object.<anonymous> (c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\node_modules\@parcel\watcher\index.js:25:13)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1243:10)
    at Module.load (node:internal/modules/cjs/loader:1058:32)
    at Module._load (node:internal/modules/cjs/loader:893:12)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1082:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (c:\Users\user\.vscode\extensions\nrwl.angular-console-18.4.0\nxls\main.js:775:21404)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
[Error - 10:07:18 PM] The Nx Console Client server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 10:07:18 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:18 PM] Nx Console Client client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:07:18 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 

Environment

 Node   : 18.16.0
   OS     : win32-x64
   npm    : 9.5.1
   
   nx                 : 16.5.0
   @nx/js             : 16.5.0
   @nx/jest           : 16.5.0
   @nx/linter         : 16.5.0
   @nx/workspace      : 16.5.0
   @nx/angular        : 16.5.0
   @nx/cypress        : 16.5.0
   @nx/devkit         : 16.5.0
   @nx/eslint-plugin  : 16.5.0
   @nrwl/tao          : 16.5.0
   @nx/web            : 16.5.0
   @nx/webpack        : 16.5.0
   nx-cloud           : 16.0.5
   typescript         : 5.1.6
  • Nx Console version: 18.4.0
  • VSCode version: 1.79.2
  • Windows 11 PRO 10.0.22621 Build 22621
@lemonCMS lemonCMS added the type: bug Something isn't working label Jul 5, 2023
@Cammisuli
Copy link
Member

Very strange, I just gave this a shot and I couldn't reproduce it.
image

Can you try uninstalling the extension, then deleting the any leftovers for it? You can find a list of extensions and their leftovers in %USERPROFILE%\.vscode\extensions. Look for nrwl.angular-console and delete the folder (if it still exists after after uninstalling from the VSCode UI)

@devongovett
Copy link

Hi, I maintain @parcel/watcher and just came across this issue. We don't currently include a prebuild for 32-bit Windows. What hardware are you running on? I was not aware of any modern CPUs that are 32-bit rather than 64-bit.

@lemonCMS
Copy link
Author

@devongovett gave the solution, i was running vscode 32bit. Installing the 64bit version fixed the problem.

@blittle
Copy link

blittle commented Jul 24, 2023

@devongovett I'm seeing this same issue running on Windows 10 inside a parallels arm64 vm.
image

@devongovett
Copy link

Is it possible that you accidentally installed the 32-bit version of node rather than the 64-bit one? Could you follow the steps here to see which version of windows you are running? https://support.microsoft.com/en-us/windows/32-bit-and-64-bit-windows-frequently-asked-questions-c6ca9541-8dce-4d48-0415-94a3faa2e13d

@blittle
Copy link

blittle commented Jul 24, 2023

Yep, that is the issue. Thank you.

@sarahec
Copy link

sarahec commented Aug 10, 2023

I'm seeing the same error message on nixos (linux). I'll investigate what the prebuild identifier should be.

ETA: The OS uses glibc. The error says "Tried @parcel/watcher-linux-x64-glibc". It's likely an issue on the nixos side.

@bradmarder
Copy link

@devongovett I can replicate this error in docker with just ENV NODE_ENV production using multiple different node images.

@devongovett
Copy link

devongovett commented Aug 11, 2023

@bradmarder did you follow the error message instructions? Does the package it printed exist, or is your platform not supported (i.e. does not exist in the npm registry)? If it is, then can you determine why it wasn't installed by your package manager (e.g. configured not to install optional dependencies)? I'll need more info if I am to help you further.

@bradmarder
Copy link

@devongovett Sorry, I should have been more clear. I'm attempting to run parcel build inside a docker container using the latest node image, and everything works perfectly unless I include the line ENV NODE_ENV production. I understand parcel already sets this variable according to the docs, so setting it in the docker file shouldn't be required, but still, this should not trigger this error.

@royteeuwen
Copy link

royteeuwen commented Aug 15, 2023

Started having the same issue here in a docker node:16 image on a kubernetes cluster, not sure if there is an easy fix?

Error: No prebuild or local build of @parcel/watcher found. Tried @parcel/watcher-linux-x64-glibc. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher. at Object.<anonymous> (/home/jenkins/agent/workspace/D_oecd-component-library_develop/node_modules/@parcel/watcher/index.js:25:13) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) at Module.require (node:internal/modules/cjs/loader:1100:19) at require (node:internal/modules/cjs/helpers:119:18) at Object.<anonymous> (/home/jenkins/agent/workspace/D_oecd-component-library_develop/node_modules/@parcel/fs/lib/index.js:7:28) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)

@devongovett
Copy link

I suspect npm/cli#4828

@sanjaymereddy
Copy link

@devongovett I get same errors on my windows machine when I installed the "Nx Console" extension. I verified that I'm using VS Code 64bit installed too.
image (4)

@devongovett
Copy link

I'm not sure what I'm supposed to do if a package manager fails to install the dependencies correctly. The package clearly exists. I don't know what package manager vscode uses, but if it is npm, then the above issue I linked is probably the place to report this.

@MaxKless
Copy link
Collaborator

@sanjaymereddy are you also using the 64 bit version of node?

@sanjaymereddy
Copy link

@MaxKless Yes, I'm using 64bit node
C:\Users>node -p "process.arch"
x64

@sarahec
Copy link

sarahec commented Aug 20, 2023

I think I've identified the root cause -- it's in @parcel/watcher and how it loads extensions. TL;dr the loading algorithm is too simple -- it's computing the expected filename and has hardcoded its search path. But these assumptions don't work on every OS and the module isn't found.

(See index.js in @parcel/watcher)

Once I can build a stand-alone reproducible case, I'll file a bug and PR on watcher.

@sarahec
Copy link

sarahec commented Aug 20, 2023

Note: I deleted a comment that said conflicting directory layouts were to blame (pre-watcher 2.2.0 vs. post-2.2.0) since it's also failing with the correct directory layout and loading code. I'm still debugging this.

(But maybe bringing all versions of watcher to 2.2.0 and losing the duplicate in yarn.lock is still a good idea.)

@sanjaymereddy
Copy link

@sarahec Thank you for looking at this issue. Please let me know when there is a fix or if there is any work around that I can try to run the extensions.

@sarahec
Copy link

sarahec commented Aug 22, 2023

To set expectations: I'm a volunteer looking into this. It's becoming clear that require is looking in the wrong place for the extensions, and I don't know if it can be fixed on the nx-console side (in the language server) or will need a PR filed against watcher.

My current working hypothesis: VSCode extensions have their own node_modules, and vscode makes assumptions about where these will be installed. It's either vscode setting the wrong path for require or a working directory issue after the language server is launched in its own process (forked).

My next step is to reproduce the bug in a code sample and have you all run it as well. That'll show what needs to happen to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants