Open jjrdevspace01 opened 2 years ago
Hey @jjrdevspace01 :wave: thanks for raising this! I was able to confirm this behavior using the provided steps. Marking as a bug 🙂
> docker run -it node:14-alpine sh
/ # npm i -g @aws-amplify/cli --unsafe-perm=true
/usr/local/bin/amplify -> /usr/local/lib/node_modules/@aws-amplify/cli/lib/run.js
> @aws-amplify/cli@8.0.2 postinstall /usr/local/lib/node_modules/@aws-amplify/cli
> node ./lib/install.js || echo "failed to install amplify binary"
Downloading release from https://d2bkhsss993doa.cloudfront.net/8.0.2/amplify-pkg-linux-arm64.tgz
amplify has been installed!
+ @aws-amplify/cli@8.0.2
added 26 packages from 16 contributors in 12.985s
/ # amplify version
/ # amplify init
/ # amplify configure
/ #
Interesting. I'm seeing several errors when I try to run the compiled binary directly on that docker image:
~/.amplify/bin # /root/.amplify/bin/amplify --version
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /root/.amplify/bin/amplify)
Error relocating /root/.amplify/bin/amplify: gnu_get_libc_version: symbol not found
Error relocating /root/.amplify/bin/amplify: __register_atfork: symbol not found
Error relocating /root/.amplify/bin/amplify: __strdup: symbol not found
Error relocating /root/.amplify/bin/amplify: setcontext: symbol not found
Error relocating /root/.amplify/bin/amplify: makecontext: symbol not found
Error relocating /root/.amplify/bin/amplify: backtrace: symbol not found
Error relocating /root/.amplify/bin/amplify: getcontext: symbol not found
Error relocating /root/.amplify/bin/amplify: __libc_stack_end: symbol not found
It looks like in order to execute our binary, more system dependencies are required.
As a short term workaround, you can either continue using v7 or install v8 via npm i -g @aws-amplify/cli-internal
. I don't generally recommend using the internal package, but it does happen to work in alpine docker.
Platform with type "Windows_NT" and architecture "ia32" is not supported by @aws-amplify/cli.}
Having same issue, is there update on this issue?
HI, trying to create a CI/CD docker image with alpine... Any new regarding this issue? amplify 7 is now too old...
when creating a pull script this error happends with the internal cli..
Failed to pull the backend. (node:509) [DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/cloudform/package.json' of 'packages/cloudform/index.js'. Please either fix that or report it to the module author 🛑 Cannot find module '@aws-amplify/datastore' Require stack:
Any ideas?
@josefaidt @johnpc
Could you share the timeline to fix this issue? Or will it be fixed at all?
It still happens with amplify cli v10.2.3
HI, trying to create a CI/CD docker image with alpine... Any new regarding this issue? amplify 7 is now too old...
when creating a pull script this error happends with the internal cli..
Failed to pull the backend. (node:509) [DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/cloudform/package.json' of 'packages/cloudform/index.js'. Please either fix that or report it to the module author 🛑 Cannot find module '@aws-amplify/datastore' Require stack:
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/@aws-amplify/codegen-ui/dist/lib/types/data.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/@aws-amplify/codegen-ui/dist/lib/types/index.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/@aws-amplify/codegen-ui/dist/lib/generate-form-definition/helpers/form-field.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/@aws-amplify/codegen-ui/dist/lib/generate-form-definition/helpers/index.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/@aws-amplify/codegen-ui/dist/lib/generate-form-definition/index.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/@aws-amplify/codegen-ui/dist/index.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/@aws-amplify/amplify-util-uibuilder/lib/commands/utils/codegenResources.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/@aws-amplify/amplify-util-uibuilder/lib/commands/utils/index.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/@aws-amplify/amplify-util-uibuilder/lib/commands/generateComponents.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/node_modules/@aws-amplify/amplify-util-uibuilder/lib/index.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/lib/extensions/amplify-helpers/invoke-plugin-method.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/lib/domain/amplify-toolkit.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/lib/domain/context.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/lib/context-manager.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/lib/index.js
- /usr/local/lib/node_modules/@aws-amplify/cli-internal/bin/amplify
Any ideas?
I was able to fix it by installing the package.
npm install -g @aws-amplify/datastore
I recommend following johnpc's advice, using cli-internal.
March 2023. Any updates so far? :wink:
Before opening, please confirm:
How did you install the Amplify CLI?
npm install -g @aws-amplify/cli --unsafe-perm=true
If applicable, what version of Node.js are you using?
14
Amplify CLI Version
no output
What operating system are you using?
alpine
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
no
Amplify Categories
Not applicable
Amplify Commands
configure
Describe the bug
amplify cli@8 produces no output or functionality
Expected behavior
amplify cli@8 works the same as @7 after installation
Reproduction steps
GraphQL schema(s)
Log output
Additional information
No response