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

Build Error: No prebuild or local build of @parcel/watcher found. #1682

Closed
patreilly opened this issue Jun 26, 2024 · 4 comments
Closed

Build Error: No prebuild or local build of @parcel/watcher found. #1682

patreilly opened this issue Jun 26, 2024 · 4 comments
Labels
dependency Issue related to upstream dependency

Comments

@patreilly
Copy link

Environment information

System:
  OS: macOS 14.5
  CPU: (8) arm64 Apple M1
  Memory: 193.45 MB / 16.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 22.3.0 - /opt/homebrew/bin/node
  Yarn: undefined - undefined
  npm: 10.8.1 - /opt/homebrew/bin/npm
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/backend: 1.0.3
  @aws-amplify/backend-cli: 1.0.3
  aws-amplify: 6.3.5
  aws-cdk: 2.143.1
  aws-cdk-lib: 2.143.1
  typescript: 5.4.5
AWS environment variables:
  AWS_PROFILE = retaildemo
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Description

i'm getting this build error for a package I believe codebuild uses during the build process, but i have no control over how this is used during deployment:

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.

I've attempted the following to fix this:

  • Updated the amplify.yml to remove --cache .npm --prefer-offline from npm ci call
  • Ran npm cache clean --force , deleted the node_modules folder and did a fresh npm install
  • deleting the package-lock.json and recreating

BUILD.txt

@patreilly patreilly added the pending-triage Incoming issues that need categorization label Jun 26, 2024
@josefaidt
Copy link
Contributor

Hey @patreilly 👋 thanks for raising this! We chatted offline and found that in a clean install (i.e. no node_modules/ or package-lock.json) the lockfile contained entries for each platform's addon. However if the lockfile is deleted and regenerated while node_modules/ still exist, only the addon for your host system is declared in the lockfile. This causes issues where after installing dependencies in the build system with npm ci, the linux addon is not installed and thus the failure in amplify pipeline-deploy

I'll mark this as a dependency issue for tracking, but seems similar to parcel-bundler/watcher#152

As a workaround, delete both the lockfile and node_modules/, then reinstall with npm install

@josefaidt josefaidt added dependency Issue related to upstream dependency and removed pending-triage Incoming issues that need categorization labels Jun 26, 2024
@patreilly
Copy link
Author

This in fact fixed the issue.

@edwardfoyle
Copy link
Contributor

This is actually an npm bug, not a parcel bug: npm/cli#4828
The workaround above is corroborated by this comment as well

@josefaidt
Copy link
Contributor

Closing in favor of tracking the issue filed in the npm CLI's repo

@josefaidt josefaidt closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Issue related to upstream dependency
Projects
None yet
Development

No branches or pull requests

3 participants