Mischa Spiegelmock
03/24/2022, 4:38 PMthdxr
03/24/2022, 4:40 PMthdxr
03/24/2022, 4:40 PMthdxr
03/24/2022, 4:40 PMMischa Spiegelmock
03/24/2022, 4:40 PMMischa Spiegelmock
03/24/2022, 4:41 PMpackages/service/...
- lambda handlers
packages/infra/..
- CDK IACthdxr
03/24/2022, 4:42 PMMischa Spiegelmock
03/24/2022, 4:46 PMthdxr
03/24/2022, 4:51 PMthdxr
03/24/2022, 4:51 PMMischa Spiegelmock
03/24/2022, 4:51 PMthdxr
03/24/2022, 4:51 PMMischa Spiegelmock
03/24/2022, 4:51 PMthdxr
03/24/2022, 4:52 PMthdxr
03/24/2022, 4:52 PMMischa Spiegelmock
03/24/2022, 4:52 PMthdxr
03/24/2022, 4:52 PMMischa Spiegelmock
03/24/2022, 4:52 PMMischa Spiegelmock
03/24/2022, 4:52 PMthdxr
03/24/2022, 4:53 PMthdxr
03/24/2022, 4:55 PMMischa Spiegelmock
03/24/2022, 4:56 PMMischa Spiegelmock
03/24/2022, 4:56 PM➜ platform git:(sst-function) ✗ npx sst deploy <aws:tombo-dev>
Using stage: mish
Preparing your SST app
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/cyber/dev/platform/node_modules/dirname-filename-esm/index.js
require() of ES modules is not supported.
require() of /Users/cyber/dev/platform/node_modules/dirname-filename-esm/index.js from /Users/cyber/dev/platform/.build/lib/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename /Users/cyber/dev/platform/node_modules/dirname-filename-esm/index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/cyber/dev/platform/node_modules/dirname-filename-esm/package.json.
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1089:13)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/Users/cyber/dev/platform/packages/infra/lib/paths.ts:3:25)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
There was an error synthesizing your app.
thdxr
03/24/2022, 4:57 PMthdxr
03/24/2022, 4:57 PMthdxr
03/24/2022, 4:57 PMMischa Spiegelmock
03/24/2022, 4:58 PMcommonjs
but I still have the same errorMischa Spiegelmock
03/24/2022, 4:59 PM/Users/cyber/dev/platform/node_modules/dirname-filename-esm/package.json.
thdxr
03/24/2022, 4:59 PMMischa Spiegelmock
03/24/2022, 5:39 PMfunction absolutePathToRelativePath(absolutePath: string): string {
if (!path.isAbsolute(absolutePath)) {
return absolutePath;
}
// For win32: root for D:\\path\\to\\dir is D:\\
// For posix: root for /path/to/dir is /
const { root } = path.parse(absolutePath);
return absolutePath.substring(root.length);
}
not sure I understand this last part, or how this affects the folder structure of the output packageMischa Spiegelmock
03/24/2022, 5:39 PM../..
inMischa Spiegelmock
03/25/2022, 11:41 AMthdxr
03/25/2022, 1:26 PMJay
Mischa Spiegelmock
04/29/2022, 3:27 PMMischa Spiegelmock
04/29/2022, 3:27 PMError: Please use sst.Function instead of lambda.Function for the "Consumer_ProfileImportQueue" Function.
at Function.fromDefinition (/Users/cyber/dev/platform/node_modules/@serverless-stack/resources/src/Function.ts:527:13)
at Queue.addConsumer (/Users/cyber/dev/platform/node_modules/@serverless-stack/resources/src/Queue.ts:100:32)
Mischa Spiegelmock
05/09/2022, 7:43 PMthdxr
05/09/2022, 7:44 PMMischa Spiegelmock
05/09/2022, 7:44 PMMischa Spiegelmock
05/16/2022, 8:00 PMthdxr
05/16/2022, 8:01 PM