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

Backend cannot be deployed with No prebuild or local build of @parcel/watcher found error. #1360

Closed
rnrnstar2 opened this issue Apr 22, 2024 · 4 comments
Labels
dependency Issue related to upstream dependency pending-triage Incoming issues that need categorization

Comments

@rnrnstar2
Copy link

Environment information

npx amplify info                                                                                                          【 main 】
System:
  OS: macOS 14.0
  CPU: (10) arm64 Apple M2 Pro
  Memory: 220.56 MB / 16.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 20.5.0 - /usr/local/bin/node
  Yarn: 1.22.19 - /usr/local/bin/yarn
  npm: 9.8.0 - /usr/local/bin/npm
  pnpm: 8.15.5 - ~/Library/pnpm/pnpm
NPM Packages:
  @aws-amplify/backend: 0.13.0-beta.20
  @aws-amplify/backend-cli: 0.12.0-beta.22
  aws-amplify: 6.0.28
  aws-cdk: 2.138.0
  aws-cdk-lib: 2.138.0
  typescript: 5.4.5
AWS environment variables:
  AWS_PROFILE = cloudteam
  AWS_DEFAULT_PROFILE = cloudteam
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Description

version: 1
applications:
  - appRoot: packages/shared-backend
    backend:
      phases:
        build:
          commands:
            - echo *** BACKEND BUILD ***
            - npm install
            - npx amplify pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID
            - ls -al
    frontend:
      phases:
        build:
          commands:
            - echo *** FRONTEND BUILD ***
            - node -v
            - amplify -v
      artifacts:
        baseDirectory: /
        files:
          - "**/*"
      cache:
        paths: []

[WARNING]: /codebuild/output/src2094350622/src/Oripa/node_modules/@parcel/watcher/index.js:26

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-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> (/codebuild/output/src2094350622/src/Oripa/node_modules/@parcel/watcher/index.js:26:13)

at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

"@aws-amplify/backend": "^0.13.0-beta.15",
"@aws-amplify/backend-cli": "^0.12.0-beta.17",

I get an error when trying to generate a backend with the latest version.
The sandbox was created using this version, so if you downgrade due to code differences, another error will occur, so please fix the bug.

@rnrnstar2 rnrnstar2 added the pending-triage Incoming issues that need categorization label Apr 22, 2024
@arundna arundna added the sandbox Related to the sandbox experience label Apr 22, 2024
@edwardfoyle
Copy link
Member

Hi @rnrnstar2, this is caused by this npm bug when using os-specific dependencies. The workaround mentioned in this comment is to delete your node_modules folder and package-lock.json file, then rerun npm install and commit the new package-lock.json file.

@edwardfoyle edwardfoyle added dependency Issue related to upstream dependency pending-response Issue is pending response from author and removed sandbox Related to the sandbox experience pending-triage Incoming issues that need categorization labels Apr 23, 2024
@rnrnstar2
Copy link
Author

I'm in a monorepo environment, so it's difficult to create package-lock.json.
Because the modules share the root node_modules.
What should I do in this case?

@github-actions github-actions bot removed the pending-response Issue is pending response from author label Apr 24, 2024
@josefaidt josefaidt added the pending-triage Incoming issues that need categorization label Apr 25, 2024
@ykethan
Copy link
Contributor

ykethan commented May 7, 2024

Hey @rnrnstar2, following up on this issue as still experiencing this issue?
could you try upgrading the latest version of Amplify backend packages.

@ykethan ykethan added the pending-response Issue is pending response from author label May 7, 2024
@rnrnstar2
Copy link
Author

I'll close it for now as it looks like I'll have a little time until I can check it out.

@github-actions github-actions bot removed the pending-response Issue is pending response from author label May 10, 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 pending-triage Incoming issues that need categorization
Projects
None yet
Development

No branches or pull requests

5 participants