Eric Ti Yu Chiang
06/15/2022, 7:00 PM> npx sst start
Using stage: eric
Preparing your SST app
=======================
Deploying debug stack
=======================
Deploying stacks
✅ eric-notes-debug-stack (no changes)
Stack eric-notes-debug-stack
Status: no changes
Outputs:
BucketArn: arn:aws:s3:::eric-notes-debug-stack-bucket83908e77-1t8nnnx6tioir
BucketName: eric-notes-debug-stack-bucket83908e77-1t8nnnx6tioir
Endpoint: <wss://c4a03wehy6.execute-api.us-east-2.amazonaws.com/eric>
===============
Deploying app
===============
TypeError: app.setDefaultFunctionProps is not a function
at Module.default (file:///home/eric/code/serixscorpio/notes/.build/lib/index.js:23:7)
at file:///home/eric/code/serixscorpio/notes/.build/run.mjs:92:16
There was an error synthesizing your app.
I think the only thing I modified from the hello world was changing import { App } from "@..."
to import App from "@.."
to address the commonjs module errorRoss Gerbasi
06/15/2022, 7:28 PM{ App }
to just App
? Could you paste a screenshot of your stack index?Eric Ti Yu Chiang
06/15/2022, 7:40 PMindex.js
and MyStack.js
Ross Gerbasi
06/15/2022, 7:44 PMimport { Api } from "@serverless-stack/resources";
and import { App } from "@serverless-stack/resources";
but if you do import Api from "@serverless-stack/resources";
Api will end up being all the exports from this file https://github.com/serverless-stack/serverless-stack/blob/master/packages/resources/src/index.ts
What was the commonjs module error you were trying to get around in the first place?Eric Ti Yu Chiang
06/15/2022, 7:46 PMRoss Gerbasi
06/15/2022, 7:50 PMnpm list
from your /home/eric/code/serixscorpio/notes
folder. Just curious what versions of things you have installed for this.Ross Gerbasi
06/15/2022, 7:53 PMresources
package is really old. it should be like 1.2.23
i think its always in sync with the cli. if you run npx sst update
does it get that back in order?Eric Ti Yu Chiang
06/15/2022, 7:55 PMresources
now updated to 1.2.23
! let me see if I can get past the commonjs errorRoss Gerbasi
06/15/2022, 7:56 PMEric Ti Yu Chiang
06/15/2022, 7:59 PMRoss Gerbasi
06/15/2022, 8:03 PM$ npm init sst javascript-starter notes
$ cd notes
$ npm install
$ npx sst start
Just threw that together here and all seems good. It put together this package.json
Not sure how ya got it in that state, but sounds like its working ok nowEric Ti Yu Chiang
06/15/2022, 8:03 PMnpm audit fix --force
, which is probably what downgraded to @serverless-stack/cli@0.4.5
Eric Ti Yu Chiang
06/15/2022, 8:06 PMEric Ti Yu Chiang
06/15/2022, 8:11 PMRoss Gerbasi
06/15/2022, 8:11 PMaudit fix --force
which puts resources out of sync with the cli. looks like you end up with 0.4.5Eric Ti Yu Chiang
06/15/2022, 8:18 PMRoss Gerbasi
06/15/2022, 8:20 PMFrank
Frank