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
When I run npx ng deploy, I get the console error below.
✔ Build Completed
An unhandled exception occurred: The "paths[0]" argument must be of type string. Received undefined
See "C:\Users\CHRIST~1\AppData\Local\Temp\ng-tAjEsr\angular-errors.log" for further details.
Checking angular-errors.log shows:
[error] TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined
at Object.resolve (node:path:171:9)
at setopts (C:\Users\Christian\Documents\Workspace\hello-world\node_modules\glob\common.js:93:21)
at new GlobSync (C:\Users\Christian\Documents\Workspace\hello-world\node_modules\glob\sync.js:37:3)
at Function.globSync [as sync] (C:\Users\Christian\Documents\Workspace\hello-world\node_modules\glob\sync.js:23:10)
at getFiles (C:\Users\Christian\Documents\Workspace\hello-world\node_modules\@jefiozie\ngx-aws-deploy\src\lib\deploy\index.js:10:17)
at C:\Users\Christian\Documents\Workspace\hello-world\node_modules\@jefiozie\ngx-aws-deploy\src\lib\deploy\index.js:54:23
at Generator.next (<anonymous>)
at fulfilled (C:\Users\Christian\Documents\Workspace\hello-world\node_modules\tslib\tslib.js:166:62)
To Reproduce
Steps to reproduce the behavior:
Create a new Angular project.
npx -p @angular/cli ng new hello-world --defaults
Add @jefiozie/ngx-aws-deploy.
npx ng add @jefiozie/ngx-aws-deploy
On a side note: running the command above only installs v4.1.0 of this package, instead of the v5.2.0 which is the latest release as of this writing.
Deploy. Environment variables don't need to be set to reproduce the issue.
npx ng deploy
Expected behavior
I expect npx ng deploy to continue its attempt to deploy, until it fails with the following output as expected, since environment variables aren't set.
❌ Missing authentication settings for AWS
❌ Missing authentication settings for AWS
Screenshots
Desktop (please complete the following information):
The file in question is in node_modules/@jefiozie/ngx-aws-deploy/src/lib/deploy/index.js.
In no. 2 of the screenshots, the value of architect_1.targetFromTargetString(buildTarget.name) does not contain the outputPath property.
No outputPath property means that getFiles(filesPath) in no. 3 of the screenshot equals getFiles(undefined). I think this causes the error.
No. 4 of the screenshot shows the workaround.
I find no. 2 suspicious, since angular.json has configured projects.hello-world.architect.build.options.outputPath to equal "dist/hello-world". Even when I set projects.hello-world.architect.build.configurations.production.outputPath, no. 2 still does not "see" outputPath.
Workaround
Deploying, while circumventing the error involves a two-step process.
Manually build the application, with npx ng build.
Deploy without rebuidling, with npx ng deploy --no-build.
The text was updated successfully, but these errors were encountered:
Describe the bug
When I run
npx ng deploy
, I get the console error below.Checking
angular-errors.log
shows:To Reproduce
Steps to reproduce the behavior:
Create a new Angular project.
Add
@jefiozie/ngx-aws-deploy
.On a side note: running the command above only installs v4.1.0 of this package, instead of the v5.2.0 which is the latest release as of this writing.
Deploy. Environment variables don't need to be set to reproduce the issue.
Expected behavior
I expect
npx ng deploy
to continue its attempt to deploy, until it fails with the following output as expected, since environment variables aren't set.Screenshots
Desktop (please complete the following information):
Additional context
Digging deeper, here are my findings.
node_modules/@jefiozie/ngx-aws-deploy/src/lib/deploy/index.js
.architect_1.targetFromTargetString(buildTarget.name)
does not contain theoutputPath
property.outputPath
property means thatgetFiles(filesPath)
in no. 3 of the screenshot equalsgetFiles(undefined)
. I think this causes the error.I find no. 2 suspicious, since
angular.json
has configuredprojects.hello-world.architect.build.options.outputPath
to equal"dist/hello-world"
. Even when I setprojects.hello-world.architect.build.configurations.production.outputPath
, no. 2 still does not "see"outputPath
.Workaround
Deploying, while circumventing the error involves a two-step process.
npx ng build
.npx ng deploy --no-build
.The text was updated successfully, but these errors were encountered: