When launching my container with AppRunner & the default instance role (AWS's built in role), my app immediately fails when it tries to talk to SecretsManager.
This is expected, because the default role doesn't have those permissions.
When I create a custom role with the required permissions though, I see unexpected behavior.
The app instead hangs for almost 5 minutes, before failing with these error messages:
11-01-2022 01:45:14 PM npm ERR! /root/.npm/_logs/2022-11-01T20_41_26_038Z-debug-0.log
11-01-2022 01:45:14 PM npm ERR! A complete log of this run can be found in:
11-01-2022 01:45:14 PM npm ERR! command sh -c -- npx prisma migrate deploy && node ./dist/src/main
11-01-2022 01:45:14 PM npm ERR! signal SIGTERM
11-01-2022 01:45:14 PM npm ERR! command failed
11-01-2022 01:45:14 PM npm ERR! path /
11-01-2022 01:41:32 PM No pending migrations to apply.
Related
I have a gatsby portfolio page that's simply all in an index.js file.
I am having trouble deploying it on AWS Amplify, here are the build logs:
# Starting phase: preBuild
# Executing command: npm install
2021-11-02T07:59:54.079Z [INFO]: > msgpackr-extract#1.0.15 install /codebuild/output/src648320162/src/simonshampoo.io/node_modules/msgpackr-extract
> node-gyp-build
2021-11-02T07:59:54.283Z [INFO]: > lmdb-store#1.6.11 install /codebuild/output/src648320162/src/simonshampoo.io/node_modules/lmdb-store
> node-gyp-build
2021-11-02T07:59:54.534Z [INFO]: > core-js#3.18.3 postinstall /codebuild/output/src648320162/src/simonshampoo.io/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
2021-11-02T07:59:54.582Z [INFO]: [96mThank you for using core-js ([94m https://github.com/zloirock/core-js [96m) for polyfilling JavaScript standard library![0m
[96mThe project needs your help! Please consider supporting of core-js:[0m
[96m>[94m https://opencollective.com/core-js [0m
[96m>[94m https://patreon.com/zloirock [0m
[96m>[94m https://paypal.me/zloirock [0m
[96m>[94m bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz [0m
[96mAlso, the author of core-js ([94m https://github.com/zloirock [96m) is looking for a good job -)[0m
2021-11-02T07:59:54.588Z [INFO]: > core-js-pure#3.18.3 postinstall /codebuild/output/src648320162/src/simonshampoo.io/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
2021-11-02T07:59:54.942Z [INFO]: > gatsby-telemetry#3.0.0 postinstall /codebuild/output/src648320162/src/simonshampoo.io/node_modules/gatsby-telemetry
> node src/postinstall.js || true
2021-11-02T07:59:55.003Z [INFO]: > gatsby-cli#4.0.0 postinstall /codebuild/output/src648320162/src/simonshampoo.io/node_modules/gatsby-cli
> node scripts/postinstall.js
2021-11-02T07:59:55.057Z [INFO]: > gatsby#4.0.1 postinstall /codebuild/output/src648320162/src/simonshampoo.io/node_modules/gatsby
> node scripts/postinstall.js
2021-11-02T07:59:56.402Z [WARNING]: npm
2021-11-02T07:59:56.403Z [WARNING]: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2021-11-02T07:59:56.407Z [INFO]: added 1667 packages from 742 contributors and audited 1668 packages in 46.524s
2021-11-02T07:59:57.367Z [INFO]: 290 packages are looking for funding
run `npm fund` for details
2021-11-02T07:59:57.369Z [INFO]: found 17 vulnerabilities (7 moderate, 9 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
2021-11-02T07:59:57.437Z [INFO]: # Completed phase: preBuild
# Starting phase: build
# Executing command: npm run build
2021-11-02T07:59:57.634Z [INFO]: > new-portfolio#1.0.0 build /codebuild/output/src648320162/src/simonshampoo.io
> gatsby build
2021-11-02T07:59:58.185Z [WARNING]: error Gatsby requires Node.js 14.15.0 or higher (you have v12.21.0).
Upgrade Node to the latest stable release: https://gatsby.dev/upgrading-node-js
2021-11-02T07:59:58.502Z [WARNING]: npm
2021-11-02T07:59:58.502Z [WARNING]: ERR! code ELIFECYCLE
npm ERR! errno 1
2021-11-02T07:59:58.504Z [WARNING]: npm
2021-11-02T07:59:58.505Z [WARNING]: ERR! new-portfolio#1.0.0 build: `gatsby build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the new-portfolio#1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-11-02T07:59:58.509Z [WARNING]:
2021-11-02T07:59:58.510Z [WARNING]: npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-02T07_59_58_505Z-debug.log
2021-11-02T07:59:58.510Z [HELP]: Outputting the npm debug log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/root/.nvm/versions/node/v12.21.0/bin/node',
1 verbose cli '/root/.nvm/versions/node/v12.21.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm#6.14.11
3 info using node#v12.21.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle new-portfolio#1.0.0~prebuild: new-portfolio#1.0.0
6 info lifecycle new-portfolio#1.0.0~build: new-portfolio#1.0.0
7 verbose lifecycle new-portfolio#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle new-portfolio#1.0.0~build: PATH: /root/.nvm/versions/node/v12.21.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/codebuild/output/src648320162/src/simonshampoo.io/node_modules/.bin:/usr/local/rvm/gems/ruby-2.4.6/bin:/usr/local/rvm/gems/ruby-2.4.6#global/bin:/usr/local/rvm/rubies/ruby-2.4.6/bin:/usr/local/rvm/bin:/root/.yarn/bin:/root/.config/yarn/global/node_modules/.bin:/root/.nvm/versions/node/v12.21.0/bin:/root/.local/bin:/root/.local/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.dotnet/tools
9 verbose lifecycle new-portfolio#1.0.0~build: CWD: /codebuild/output/src648320162/src/simonshampoo.io
10 silly lifecycle new-portfolio#1.0.0~build: Args: [ '-c', 'gatsby build' ]
11 silly lifecycle new-portfolio#1.0.0~build: Returned: code: 1 signal: null
12 info lifecycle new-portfolio#1.0.0~build: Failed to exec build script
13 verbose stack Error: new-portfolio#1.0.0 build: `gatsby build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/root/.nvm/versions/node/v12.21.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (/root/.nvm/versions/node/v12.21.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1022:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid new-portfolio#1.0.0
15 verbose cwd /codebuild/output/src648320162/src/simonshampoo.io
16 verbose Linux 4.14.248-189.473.amzn2.x86_64
17 verbose argv "/root/.nvm/versions/node/v12.21.0/bin/node" "/root/.nvm/versions/node/v12.21.0/bin/npm" "run" "build"
18 verbose node v12.21.0
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 1
22 error new-portfolio#1.0.0 build: `gatsby build`
22 error Exit status 1
23 error Failed at the new-portfolio#1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
2021-11-02T07:59:58.513Z [ERROR]: !!! Build failed
2021-11-02T07:59:58.513Z [ERROR]: !!! Non-Zero Exit Code detected
2021-11-02T07:59:58.513Z [INFO]: # Starting environment caching...
2021-11-02T07:59:58.513Z [INFO]: # Environment caching completed
Terminating logging...
It says that my node is outdated, but I do node -v in the project directory and it says I have v14.8.1, so I am confused. Is there another problem? public subdirectory was previously gitignored, so I removed it from there, but that doesn't seem to do anything. I can't find much information about deployment failures on Amplify since it's supposed to be straightforward. Do I have to use nvm? It also won't even deploy on Github pages-- it just shows the "Gatsby Minimal Starter" page in my repo.
I think there's a mismatching Node version between your local environment and the AWS Amplify's. If you run different versions of Node, the installed dependencies in the npm install will be different so your application will behave differently in both environments, assuming that it builds locally (if don't, there might be another underlying problem).
As you pointed, you can use nvm to set the provision version. Based on How to change Node Version in Provision Step in Amplify Console you can try:
frontend:
phases:
preBuild:
commands:
- nvm install your_local_node_version
Using a .nvmrc file in the root of the project should also work. You can set it directly by:
node -v > .nvmrc
Out of the scope of the question: /public directory should be always ignored because it's autogenerated in each build, so it will be overridden. There's no point in pushing it and it will save you MB bandwidth.
I am setting up truffle with my Ubuntu 18.04 LTS and VS Code, getting follwowing truffle quickstart
However, the truffle compile or truffle migrate or truffle test does not work. Even it does not throw any exception. Anybody faced the similar issue?
truffle compile is not working. When I run the command it simply returns even its not showing any error.
truffle init is working properly so that truffle istallation is not an issue. But truffle compile and migrate commands having issue.
How can I fix this on Ubuntu machine??
Truffle v5.0.4 (core: 5.0.4)
Solidity v0.5.0 (solc-js)
Node v8.10.0
After burning two nights, I have realized that truffle 5.0.4 is not stable yet. For which truffle compile, build or migrate does not function even it does not throw any exception.
I have uninstalled the truffle 5.0.4 and installed the Truffle v5.0.0-next.26 (core: 5.0.0-beta.2) and it starts working.
abdus#abdus-HP-EliteBook-8460p:~$ which truffle
/usr/local/bin/truffle
abdus#abdus-HP-EliteBook-8460p:~$ rm -r /usr/local/bin/truffle
rm: cannot remove '/usr/local/bin/truffle': Permission denied
abdus#abdus-HP-EliteBook-8460p:~$ sudo rm -r /usr/local/bin/truffle
abdus#abdus-HP-EliteBook-8460p:~$ which truffle
abdus#abdus-HP-EliteBook-8460p:~$ sudo npm uninstall -g truffle
removed 91 packages in 3.35s
abdus#abdus-HP-EliteBook-8460p:~$ truffle --version
bash: /usr/local/bin/truffle: No such file or directory
abdus#abdus-HP-EliteBook-8460p:~$ truffle --version
bash: /usr/local/bin/truffle: No such file or directory
abdus#abdus-HP-EliteBook-8460p:~$ sudo npm install -g truffle#5.0.0-next.26
/usr/local/bin/truffle -> /usr/local/lib/node_modules/truffle/build/cli.bundled.js
keccak#1.4.0 install /usr/local/lib/node_modules/truffle/node_modules/keccak
npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."
keccak#1.4.0 rebuild /usr/local/lib/node_modules/truffle/node_modules/keccak
node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/truffle/node_modules/keccak/build'
gyp ERR! System Linux 4.15.0-45-generic
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/truffle/node_modules/keccak
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keccak#1.4.0 rebuild: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keccak#1.4.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Keccak bindings compilation fail. Pure JS implementation will be used.
+ truffle#5.0.0-next.26
added 91 packages from 305 contributors in 30.464s
abdus#abdus-HP-EliteBook-8460p:~$ sudo npm install -g truffle#5.0.0-next.26
/usr/local/bin/truffle -> /usr/local/lib/node_modules/truffle/build/cli.bundled.js
+ truffle#5.0.0-next.26
updated 1 package in 4.731s
abdus#abdus-HP-EliteBook-8460p:~$ sudo npm install -g truffle#5.0.0-next.26
/usr/local/bin/truffle -> /usr/local/lib/node_modules/truffle/build/cli.bundled.js
+ truffle#5.0.0-next.26
updated 1 package in 4.075s
abdus#abdus-HP-EliteBook-8460p:~/election$ truffle version
Truffle v5.0.0-next.26 (core: 5.0.0-beta.2)
Solidity v0.5.0 (solc-js)
Node v8.10.0
abdus#abdus-HP-EliteBook-8460p:~/election$ truffle init
✔ Preparing to download
✔ Downloading
✔ Cleaning up temporary files
✔ Setting up box
Unbox successful. Sweet!
Commands:
Compile: truffle compile
Migrate: truffle migrate
Test contracts: truffle test
abdus#abdus-HP-EliteBook-8460p:~/election$ truffle compile
Compiling ./contracts/Migrations.sol...
Writing artifacts to ./build/contracts
abdus#abdus-HP-EliteBook-8460p:~/election$ truffle build
No build configuration found. Preparing to compile contracts.
abdus#abdus-HP-EliteBook-8460p:~/election$ truffle migrate
⚠️ Important ⚠️
If you're using an HDWalletProvider, it must be Web3 1.0 enabled or your migration will hang.
Try: npm install --save truffle-hdwallet-provider#web3-one
Starting migrations...
Network name: 'ganache'
Network id: 5777
Block gas limit: 6721975
1_initial_migration.js
Deploying 'Migrations'
transaction hash: 0x393caf519758cb8baf13ee100d5a0a08e329674d77489888f61833aa83cdb5d9
Blocks: 0 Seconds: 0
contract address: 0xC2d9c21b93d3D29b9ac03697CAc058FdA432Ce98
account: 0xA0d939f21C2d714754EB7a3091545B5C423EE18E
balance: 99.99430184
gas used: 284908
gas price: 20 gwei
value sent: 0 ETH
total cost: 0.00569816 ETH
Saving migration to chain.
Saving artifacts
Total cost: 0.00569816 ETH
Summary
Total deployments: 1
Final cost: 0.00569816 ETH
abdus#abdus-HP-EliteBook-8460p:~/election$ touch contracts/Election.sol
abdus#abdus-HP-EliteBook-8460p:~/election$ truffle build
No build configuration found. Preparing to compile contracts.
Compiling ./contracts/Election.sol...
Writing artifacts to ./build/contracts
I'm trying to use mdb pro in my angular application.
So, things were working for me for the last 3 months.
Following is the line from the package.json with token replaced
"ng-uikit-pro-standard":
"git+https://oauth2:mytoken#git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git",
Following is the output I'm seeing now. I'm running this on aws codebuild.
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t
https://oauth2:mytoken#git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git
npm ERR!
npm ERR! fatal: unable to access
'https://oauth2:mytoken#git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git/':
server certificate verification failed. CAfile:
/etc/ssl/certs/ca-certificates.crt CRLfile: none
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-12-02T14_05_27_185Z-debug.log
[Container] 2018/12/02 14:05:27 Command did not exit successfully npm
install exit status 1
[Container] 2018/12/02 14:05:27 Phase complete: INSTALL Success:
false
[Container] 2018/12/02 14:05:27 Phase context status code:
COMMAND_EXECUTION_ERROR Message: Error while executing command: npm
install. Reason: exit status 1
I found out that the token generated had the expiry time.
I generated a new token and followed the instruction here to make it work.
https://mdbootstrap.com/docs/angular/getting-started/quick-start/
hopefully, it will help someone.
I am using the Bitnami Mean Image to try to host my site on AWS EC2. Once I ssh into my EC2 instance and clone my github repo, I try to run sudo npm install but it won't work. My error message is:
npm ERR! code 1 npm ERR! Command failed: /opt/bitnami/git/bin/git
clone --depth=1 -q -b master
https://github.com/frozeman/bignumber.js-nolookahead.git
/home/bitnami/.npm/_cacache/tmp/git-clone-4966f918 npm ERR!
/home/bitnami/.npm/_cacache/tmp/git-clone-4966f918/.git: Permission
denied npm ERR!
npm ERR! A complete log of this run can be found in: npm ERR!
/home/bitnami/.npm/_logs/2018-02-16T07_07_33_645Z-debug.log
I've been using Zurb Foundation for Emails successfully for quite some time. Suddenly the build process is failing.
I updated to Node 7.7.2 and NPM 4.1.2, deleted the node_modules directory and ran npm install to reinstall the dependencies, but it didn't solve the issue.
$ npm run build
foundation-emails-template#1.0.0 build /Users/[REDACTED]
gulp --production
[12:46:56] Requiring external module babel-register
[12:46:57] Using gulpfile ~/[REDACTED]/gulpfile.babel.js
[12:46:57] Starting 'default'...
[12:46:57] Starting 'build'...
[12:46:57] Starting 'clean'...
[12:46:57] Finished 'clean' after 11 ms
[12:46:57] Starting 'pages'...
[12:46:59] Finished 'pages' after 1.32 s
[12:46:59] Starting 'sass'...
[12:47:05] 'sass' errored after 6.91 s
[12:47:05] Error in plugin 'gulp-uncss'
Message:
Unexpected EOF
Details:
domainEmitter: [object Object]
domain: [object Object]
domainThrown: false
[12:47:05] 'build' errored after 8.25 s
[12:47:05] 'default' errored after 8.25 s
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v7.7.2
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! foundation-emails-template#1.0.0 build: `gulp --production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the foundation-emails-template#1.0.0 build script 'gulp --production'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the foundation-emails-template package,
npm ERR! not with npm itself.
Or if I try to run gulp --production by itself:
$ gulp --production
[12:29:38] Requiring external module babel-core/register
[12:29:39] Using gulpfile ~/[REDACTED]/gulpfile.babel.js
/usr/local/lib/node_modules/gulp/bin/gulp.js:129
gulpInst.start.apply(gulpInst, toRun);
^
TypeError: Cannot read property 'apply' of undefined
at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:19
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
npm start works as expected; I just can't inline the styles.
Any ideas? TIA.
It's because the node environment had changed.
Run this in your console:
npm rebuild node-sass
npm rebuild gulp-uncss
It should fix the issue.
I got the same error and was caused by a code-specific issue so make sure all your code is valid. In my case I was missing a closing " on a class.