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
npm run deploy:customStage -- -- -- '--stage simi'
Also tried with:
npm run deploy:customStage -- -- -- '--stage' 'simi'
The expectation was that the stagename simi passed through the command line will be sent to packageA/package.json script resulting in
../../node_modules/serverless/bin/serverless.js deploy -v --stage simi
However, I get the following error:
$ npm run deploy:customStage -- -- --'--stage simi'
rootproject0.1.0 deploy:customStage
./node_modules/lerna/cli.js run deploy:customStage "--" "----stage simi"
lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 1 package: "npm run deploy:customStage ----stage simi"
$ npm run deploy:customStage -- -- -- '--stage simi'
./node_modules/lerna/cli.js run deploy:customStage "--" "--" "--stage simi"
lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 1 package: "npm run deploy:customStage -- --stage simi"
lerna ERR! npm run deploy:customStage -- --stage simi exited 1 in 'vlncc-resources-app-config'
lerna ERR! npm run deploy:customStage -- --stage simi stdout:
> packageA@0.1.0 deploy:customStage
> ../../node_modules/serverless/bin/serverless.js deploy -v "--stage simi"
Serverless Error ----------------------------------------
Serverless command "deploy --stage simi" not found. Run "serverless help" for a list of all available commands.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: win32
Node Version: 15.11.0
Framework Version: 2.62.0 (local)
Plugin Version: 5.4.7
SDK Version: 4.3.0
Components Version: 3.17.1
Serverless: Deprecation warnings:
"serverless" command options are expected to follow command and not be put before the command.
Starting from the next major Serverless will no longer support the latter form.
More Info: https://www.serverless.com/framework/docs/deprecations/#CLI_OPTIONS_BEFORE_COMMAND
Variables resolver reports the following resolution errors:
- Cannot resolve variable at "provider.stage": Cannot load file from outside of a project directory (configure "projectDir" to extend project boundary)
From a next major this will be communicated with a thrown error.
Set "variablesResolutionMode: 20210326" in your service config, to adapt to new behavior now
More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_VARIABLES_RESOLVER
lerna ERR! npm run deploy:customStage -- --stage simi exited 1 in 'packageA'
The text was updated successfully, but these errors were encountered:
Hi @s1mrankaur, there are a couple of things to note:
./node_modules/lerna/cli.js is definitely an unexpected usage of lerna.
Please try updating to the latest major version of lerna which released since we took over stewardship, and update your usage to be the expected lerna run.
Why do you have so many double dashes in your invocation?
npm run deploy:customStage -- -- -- '--stage simi'
I think you should only need two pairs of dashes before your argument, not three: 1 for npm forwarding, 1 for lerna run forwarding
P.S. I cannot comment on that library specifically as I have never used it, but I would also strongly suggest verifying that this is the intended way to invoke the serverless executable ../../node_modules/serverless/bin/serverless.js, I would imagine npx serverless would be more idiomatic
I will close this for now, but please feel free to reopen if you follow the above advice and it is still not working on the latest version
In root package.json, I have:
"deploy:customStage": "./node_modules/lerna/cli.js run deploy:customStage",
In packageA/package.json I have:
"deploy:customStage": "../../node_modules/serverless/bin/serverless.js deploy -v",
From command line I execute:
npm run deploy:customStage -- -- -- '--stage simi'
Also tried with:
npm run deploy:customStage -- -- -- '--stage' 'simi'
The expectation was that the stagename simi passed through the command line will be sent to packageA/package.json script resulting in
../../node_modules/serverless/bin/serverless.js deploy -v --stage simi
However, I get the following error:
$ npm run deploy:customStage -- -- --'--stage simi'
lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 1 package: "npm run deploy:customStage ----stage simi"
$ npm run deploy:customStage -- -- -- '--stage simi'
lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 1 package: "npm run deploy:customStage -- --stage simi"
lerna ERR! npm run deploy:customStage -- --stage simi exited 1 in 'vlncc-resources-app-config'
lerna ERR! npm run deploy:customStage -- --stage simi stdout:
The text was updated successfully, but these errors were encountered: