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

Error starting Amplify Gen2 project #981

Closed
MKlaeui opened this issue Feb 2, 2024 · 5 comments
Closed

Error starting Amplify Gen2 project #981

MKlaeui opened this issue Feb 2, 2024 · 5 comments
Assignees
Labels
bug Something isn't working create-amplify Issues related to create-amplify flow dependency Issue related to upstream dependency p1

Comments

@MKlaeui
Copy link

MKlaeui commented Feb 2, 2024

Environment information

System:
    OS: Linux 6.1 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (8) x64 AMD Ryzen 3 7320C with Radeon Graphics
    Memory: 6.22 GB / 6.40 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 20.10.0 - ~/.config/nvm/versions/node/v20.10.0/bin/node
    Yarn: 1.22.21 - ~/.config/nvm/versions/node/v20.10.0/bin/yarn
    npm: 10.4.0 - ~/.config/nvm/versions/node/v20.10.0/bin/npm
    pnpm: 8.15.1 - ~/.config/nvm/versions/node/v20.10.0/bin/pnpm
    bun: Not Found
    Watchman: Not Found
  npmPackages:
    @aws-amplify/backend: Not Found
    @aws-amplify/backend-cli: Not Found
    aws-amplify: ^6.0.13 => 6.0.13 
    aws-cdk: Not Found
    aws-cdk-lib: Not Found
    typescript: ^5 => 5.3.3

Description

I followed the online Next app instructions for installation of a Gen2 Amplify project; step one (npm create next-app@14) works fine but step 2 (npm create amplify@latest) fails with an error code 1. It appears to be while installing @parcel/watcher. I'm using a Chromebook. The last part of the log file follows:


npm create nex3563 timing build:link:node_modules/jsesc Completed in 9ms
3564 timing build:link:node_modules/prettier Completed in 9ms
3565 timing build:link:node_modules/tsx Completed in 9ms
3566 timing build:link:node_modules/update-browserslist-db Completed in 9ms
3567 timing build:link:node_modules/uglify-js Completed in 9ms
3568 timing build:link:node_modules/@aws-amplify/codegen-ui-react/node_modules/typescript Completed in 9ms
3569 timing build:link:node_modules/aws-cdk-lib/node_modules/semver Completed in 8ms
3570 timing build:link:node_modules/@aws-amplify/graphql-generator/node_modules/@aws-amplify/graphql-types-generator Completed in 10ms
3571 timing build:link:node_modules/@aws-amplify/graphql-generator/node_modules/prettier Completed in 10ms
3572 timing build:link:node_modules/@aws-sdk/client-amplifyuibuilder/node_modules/uuid Completed in 9ms
3573 timing build:link:node_modules/@aws-sdk/client-cloudformation/node_modules/uuid Completed in 9ms
3574 timing build:link:node_modules/@aws-sdk/client-ssm/node_modules/fast-xml-parser Completed in 9ms
3575 timing build:link:node_modules/@babel/core/node_modules/json5 Completed in 9ms
3576 timing build:link Completed in 13ms
3577 info run @parcel/watcher@2.4.0 install node_modules/@parcel/watcher node-gyp rebuild
3578 info run @parcel/watcher@2.4.0 install { code: 1, signal: null }
3579 timing reify:rollback:createSparse Completed in 1464ms
3580 timing reify:rollback:retireShallow Completed in 1ms
3581 timing command:install Completed in 93624ms
3582 verbose stack Error: command failed
3582 verbose stack     at ChildProcess.<anonymous> (/home/myusername/.config/nvm/versions/node/v20.10.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
3582 verbose stack     at ChildProcess.emit (node:events:514:28)
3582 verbose stack     at maybeClose (node:internal/child_process:1105:16)
3582 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
3583 verbose pkgid @parcel/watcher@2.4.0
3584 verbose cwd /home/myusername/nh
3585 verbose Linux 6.1.60-08594-g03a802b9a072
3586 verbose node v20.10.0
3587 verbose npm  v10.4.0
3588 error code 1
3589 error path /home/myusername/nh/node_modules/@parcel/watcher
3590 error command failed
3591 error command sh -c node-gyp rebuild
3592 error gyp info it worked if it ends with ok
3592 error gyp info using node-gyp@10.0.1
3592 error gyp info using node@20.10.0 | linux | x64
3592 error gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
3592 error gyp info spawn /usr/bin/python3
3592 error gyp info spawn args [
3592 error gyp info spawn args '/home/myusername/.config/nvm/versions/node/v20.10.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
3592 error gyp info spawn args 'binding.gyp',
3592 error gyp info spawn args '-f',
3592 error gyp info spawn args 'make',
3592 error gyp info spawn args '-I',
3592 error gyp info spawn args '/home/myusername/nh/node_modules/@parcel/watcher/build/config.gypi',
3592 error gyp info spawn args '-I',
3592 error gyp info spawn args '/home/myusername/.config/nvm/versions/node/v20.10.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
3592 error gyp info spawn args '-I',
3592 error gyp info spawn args '/home/myusername/.cache/node-gyp/20.10.0/include/node/common.gypi',
3592 error gyp info spawn args '-Dlibrary=shared_library',
3592 error gyp info spawn args '-Dvisibility=default',
3592 error gyp info spawn args '-Dnode_root_dir=/home/myusername/.cache/node-gyp/20.10.0',
3592 error gyp info spawn args '-Dnode_gyp_dir=/home/myusername/.config/nvm/versions/node/v20.10.0/lib/node_modules/npm/node_modules/node-gyp',
3592 error gyp info spawn args '-Dnode_lib_file=/home/myusername/.cache/node-gyp/20.10.0/<(target_arch)/node.lib',
3592 error gyp info spawn args '-Dmodule_root_dir=/home/myusername/nh/node_modules/@parcel/watcher',
3592 error gyp info spawn args '-Dnode_engine=v8',
3592 error gyp info spawn args '--depth=.',
3592 error gyp info spawn args '--no-parallel',
3592 error gyp info spawn args '--generator-output',
3592 error gyp info spawn args 'build',
3592 error gyp info spawn args '-Goutput_dir=.'
3592 error gyp info spawn args ]
3592 error gyp: binding.gyp not found (cwd: /home/myusername/nh/node_modules/@parcel/watcher) while trying to load binding.gyp
3592 error gyp ERR! configure error 
3592 error gyp ERR! stack Error: `gyp` failed with exit code: 1
3592 error gyp ERR! stack at ChildProcess.<anonymous> (/home/myusername/.config/nvm/versions/node/v20.10.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:271:18)
3592 error gyp ERR! stack at ChildProcess.emit (node:events:514:28)
3592 error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
3592 error gyp ERR! System Linux 6.1.60-08594-g03a802b9a072
3592 error gyp ERR! command "/home/myusername/.config/nvm/versions/node/v20.10.0/bin/node" "/home/myusername/.config/nvm/versions/node/v20.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
3592 error gyp ERR! cwd /home/myusername/nh/node_modules/@parcel/watcher
3592 error gyp ERR! node -v v20.10.0
3592 error gyp ERR! node-gyp -v v10.0.1
3592 error gyp ERR! not ok
3593 verbose exit 1
3594 timing npm Completed in 93862ms
3595 verbose unfinished npm timer reify 1706791280940
3596 verbose unfinished npm timer reify:build 1706791372705
3597 verbose unfinished npm timer build 1706791372707
3598 verbose unfinished npm timer build:deps 1706791372708
3599 verbose unfinished npm timer build:run:install 1706791372742
3600 verbose unfinished npm timer build:run:install:node_modules/@parcel/watcher 1706791372742
3601 verbose code 1
3602 error A complete log of this run can be found in: /home/myusername/.npm/_logs/2024-02-01T12_41_20_715Z-debug-0.logt-app@1
@MKlaeui MKlaeui added the pending-triage Incoming issues that need categorization label Feb 2, 2024
@josefaidt
Copy link
Contributor

Hey @MKlaeui 👋 thanks for taking the time to file this! Upon further investigation this issue appears similar if not the same as parcel-bundler/watcher#156

From this comment there appears to be a workaround of overriding the dependency version resolved

  "overrides": {
    "@parcel/watcher": "~2.1.0"
  }

@josefaidt josefaidt added dependency Issue related to upstream dependency bug Something isn't working create-amplify Issues related to create-amplify flow and removed pending-triage Incoming issues that need categorization labels Feb 2, 2024
@MKlaeui
Copy link
Author

MKlaeui commented Feb 3, 2024

That did the trick! Thanks much

@MKlaeui MKlaeui closed this as completed Feb 3, 2024
@josefaidt josefaidt reopened this Feb 9, 2024
@josefaidt
Copy link
Contributor

re-opening to track due to multiple occurrences in Cloud9 environments

@0618
Copy link
Contributor

0618 commented Feb 16, 2024

@MKlaeui 👋

I was able to reproduce it using npm@10.4, but not npm@10.2.

As mentioned in parcel-bundler/watcher#156 (comment) , it only happens to npm@10.4 for other @parcel/watch users.

As mentioned in parcel-bundler/watcher#156 (comment), it's bug of npm (npm/cli#2606).

@0618
Copy link
Contributor

0618 commented Feb 21, 2024

The fix is released

@0618 0618 closed this as completed Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working create-amplify Issues related to create-amplify flow dependency Issue related to upstream dependency p1
Projects
None yet
Development

No branches or pull requests

4 participants