thdxr
03/28/2022, 4:47 PMBlockPublicAccesError
in thereOmi Chowdhury
03/28/2022, 4:48 PMOmi Chowdhury
03/28/2022, 4:48 PMOmi Chowdhury
03/28/2022, 7:26 PMTypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received undefined
at new NodeError (internal/errors.js:322:7)
at validateString (internal/validators.js:124:11)
at Module.require (internal/modules/cjs/loader.js:967:3)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (/Users/omi/workspaces/sst-services/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.js:19:17)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
code: 'ERR_INVALID_ARG_TYPE'
}
Seems to stem from this line:
// sst-services/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.js
const name = process.argv[2];
const stage = process.argv[3];
const region = process.argv[4];
const appBuildLibPath = process.argv[5];
// Load environment variables from dotenv
Util.Environment.load({
searchPaths: [`.env.${stage}.local`, `.env.${stage}`],
});
// Validate the `debugStack` option in user SST app's index
const handler = require(appBuildLibPath);
I logged out `process.argv`:
process.argv [
'/Users/omi/.nvm/versions/node/v14.18.2/bin/node',
'/Users/omi/workspaces/sst-services/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.js',
'fragment-services',
'omi',
'/Users/omi/workspaces/sst-services/.build/lib'
]
Looks like region is missing?Omi Chowdhury
03/28/2022, 8:36 PMStacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Building changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
Stacks: Synthesizing changes...
First time it looped for 30 mins (left it over lunch), then 10 minutes - both times had to exit with ctrl. + c)Omi Chowdhury
04/06/2022, 12:48 AMchokidar_1.default
.watch(path_1.default.dirname(config.main) + "/**/*", {
persistent: true,
ignoreInitial: true,
followSymlinks: false,
ignored: ["**/node_modules/**", "**/.build/**", "**/.sst/**"]
})
(we dirty patched the compiled version to test itOmi Chowdhury
04/06/2022, 12:52 AMthdxr
04/06/2022, 12:57 AMOmi Chowdhury
04/06/2022, 1:49 AMOmi Chowdhury
04/06/2022, 1:52 AMthdxr
04/06/2022, 2:02 AMthdxr
04/06/2022, 2:02 AMFrank
Omi Chowdhury
04/09/2022, 9:33 PM➜ sst-services git:(dev) ✗ yarn sst --version
yarn run v1.22.10
$ /Users/omi/workspaces/node_modules/.bin/sst --version
SST: 0.69.5
CDK: 2.15.0
✨ Done in 1.27s.
➜ sst-services git:(dev) ✗ yarn sst start
yarn run v1.22.10
$ /Users/omi/workspaces/node_modules/.bin/sst start
Using stage: omi
Preparing your SST app
=======================
Deploying debug stack
=======================
process.argv [
'/Users/omi/.nvm/versions/node/v14.17.0/bin/node',
'/Users/omi/workspaces/sst-services/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.js',
'fragment-services',
'omi',
'/Users/omi/workspaces/sst-services/.build/lib'
]
internal/validators.js:124
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received undefined
at validateString (internal/validators.js:124:11)
at Module.require (internal/modules/cjs/loader.js:950:3)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/omi/workspaces/sst-services/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.js:18:17)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'ERR_INVALID_ARG_TYPE'
}
I logged out process.argv
- same as before
Works fine with --region flag