You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
In serverless.yml file, the default profile name is 'sandbox'.
When running sls deploy command and not passing --profile argument, it automatically tries to use the sandbox profile.
profile: ${opt:profile, 'sandbox'}
Now, In package.json at the root of the application folder that the CI/CD pipeline needs to deploy, we have,
"deploy:cicd": " lerna run deploy --stream",
This will run the deploy command in all of the serverless services.
In package.json of each of the services, I have: "deploy": "sls deploy -v",
When the command, npm run deploy:cicd is run, it throws
profile not found error when I run deploy command from build.sh
If I add deploy in deploy.sh, I instead get
lerna run deploy --stream
--
51 |
52 | internal/modules/cjs/loader.js:834
53 | throw err;
54 | ^
55 |
56 | Error: Cannot find module '.'
57 | Require stack:
58 | - /codebuild/output/src163111865/src/node_modules/.bin/lerna
59 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
60 | at Function.Module._load (internal/modules/cjs/loader.js:687:27)
61 | at Module.require (internal/modules/cjs/loader.js:903:19)
62 | at require (internal/modules/cjs/helpers.js:74:18)
63 | at Object. (/codebuild/output/src163111865/src/node_modules/.bin/lerna:11:3)
64 | at Module._compile (internal/modules/cjs/loader.js:1015:30)
65 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
66 | at Module.load (internal/modules/cjs/loader.js:879:32)
67 | at Function.Module._load (internal/modules/cjs/loader.js:724:14)
68 | at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
69 | code: 'MODULE_NOT_FOUND',
70 | requireStack: [ '/codebuild/output/src163111865/src/node_modules/.bin/lerna' ]
71 | }
72 | npm ERR! code 1
73 | npm ERR! path /codebuild/output/src163111865/src
74 | npm ERR! command failed
75 | npm ERR! command sh -c lerna run deploy --stream
76 |
77 | npm ERR! A complete log of this run can be found in:
78 | npm ERR! /root/.npm/_logs/2021-03-15T23_30_13_216Z-debug.log
The text was updated successfully, but these errors were encountered:
s1mrankaur
changed the title
How can a profile be used for the deployment when using this CI/CD pipeline for deployment
Error running the deployment from the CI/CD pipeline
Mar 15, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In
serverless.yml
file, the default profile name is 'sandbox'.When running
sls deploy
command and not passing--profile
argument, it automatically tries to use thesandbox
profile.profile: ${opt:profile, 'sandbox'}
Now, In
package.json
at the root of the application folder that the CI/CD pipeline needs to deploy, we have,"deploy:cicd": " lerna run deploy --stream",
This will run the
deploy
command in all of the serverless services.In package.json of each of the services, I have:
"deploy": "sls deploy -v",
When the command,
npm run deploy:cicd
is run, it throwsdeploy in deploy.sh
, I instead getThe text was updated successfully, but these errors were encountered: