Greg Martin
11/04/2021, 1:29 PMThere was an error synthesizing your app.
thdxr
11/04/2021, 1:39 PMGreg Martin
11/04/2021, 1:40 PMGreg Martin
11/04/2021, 1:40 PMnpx sst deploy
Greg Martin
11/04/2021, 1:40 PMGreg Martin
11/04/2021, 1:40 PMGreg Martin
11/04/2021, 1:41 PMnpx sst remove
to see if I can have a do-over and whatever went wrong is now okthdxr
11/04/2021, 1:41 PMGreg Martin
11/04/2021, 1:42 PMgmartin:serverless-notes-app gregorymartin$ npx sst deploy
Using stage: glm
Preparing your SST app
Transpiling source
Linting source
Building Lambda function src/create.main
Building Lambda function src/get.main
Building Lambda function src/list.main
Building Lambda function src/update.main
Building Lambda function src/delete.main
Building Lambda function src/billing.main
Building static site frontend
> frontend@0.1.0 build /Users/gregorymartin/local_sites/serverless-notes-app/frontend
> react-scripts build
sh: react-scripts: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! frontend@0.1.0 build: `react-scripts build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the frontend@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/gregorymartin/.npm/_logs/2021-11-04T13_29_09_308Z-debug.log
Error: There was a problem building the "ReactSite" StaticSite.
at ReactStaticSite.buildApp (/Users/gregorymartin/local_sites/serverless-notes-app/node_modules/@serverless-stack/resources/src/StaticSite.ts:191:15)
at new StaticSite (/Users/gregorymartin/local_sites/serverless-notes-app/node_modules/@serverless-stack/resources/src/StaticSite.ts:93:24)
at new ReactStaticSite (/Users/gregorymartin/local_sites/serverless-notes-app/node_modules/@serverless-stack/resources/src/ReactStaticSite.ts:43:5)
at new FrontendStack (/Users/gregorymartin/local_sites/serverless-notes-app/stacks/FrontendStack.js:10:22)
at Object.main (/Users/gregorymartin/local_sites/serverless-notes-app/stacks/index.js:18:5)
at Object.<anonymous> (/Users/gregorymartin/local_sites/serverless-notes-app/.build/run.js:93:16)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
There was an error synthesizing your app.
gmartin:serverless-notes-app gregorymartin$ npx sst remove
Greg Martin
11/04/2021, 1:43 PMreact-scripts build
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js4818)
12 verbose stack at ChildProcess.emit (events.js31120)
12 verbose stack at maybeClose (internal/child_process.js102116)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js2865)
13 verbose pkgid frontend@0.1.0
14 verbose cwd /Users/gregorymartin/local_sites/serverless-notes-app/frontend
15 verbose Darwin 20.6.0
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
17 verbose node v12.16.1
18 verbose npm v6.13.4
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error frontend@0.1.0 build: react-scripts build
23 error spawn ENOENT
24 error Failed at the frontend@0.1.0 build script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]Greg Martin
11/04/2021, 1:45 PMnpx sst remove
finished and now I am try again with
npx sst start
thdxr
11/04/2021, 1:45 PMfrontend
folderthdxr
11/04/2021, 1:45 PMnpm i
Greg Martin
11/04/2021, 1:46 PMnpm install
?thdxr
11/04/2021, 1:46 PMreact-scripts
is not found. The frontend app is its own project with its own dependencies that it needsthdxr
11/04/2021, 1:46 PMyarn
instead of npm
and taking advantage of workspaces - running yarn
at the root will install dependencies for all sub-projectsGreg Martin
11/04/2021, 1:46 PMGreg Martin
11/04/2021, 1:52 PMDeploying stacks
Checking deploy status...
glm-serverless-app-storage | CREATE_IN_PROGRESS | AWS::CloudFormation::Stack | glm-serverless-app-storage
glm-serverless-app-storage | CREATE_IN_PROGRESS | AWS::S3::Bucket | UploadsBucketC4B27CC7
glm-serverless-app-storage | CREATE_IN_PROGRESS | AWS::CDK::Metadata | SSTMetadata
glm-serverless-app-storage | CREATE_IN_PROGRESS | AWS::DynamoDB::Table | NotesTable7100B0E8
glm-serverless-app-storage | CREATE_IN_PROGRESS | AWS::S3::Bucket | UploadsBucketC4B27CC7
glm-serverless-app-storage | CREATE_FAILED | AWS::DynamoDB::Table | NotesTable7100B0E8 glm-serverless-app-Notes already exists
glm-serverless-app-storage | CREATE_IN_PROGRESS | AWS::CDK::Metadata | SSTMetadata
glm-serverless-app-storage | CREATE_COMPLETE | AWS::CDK::Metadata | SSTMetadata
Checking deploy status...
Checking deploy status...
glm-serverless-app-storage | CREATE_COMPLETE | AWS::S3::Bucket | UploadsBucketC4B27CC7
glm-serverless-app-storage | CREATE_FAILED | AWS::CloudFormation::Stack | glm-serverless-app-storage
❌ glm-serverless-app-storage failed: glm-serverless-app-Notes already exists
Stack glm-serverless-app-storage
Status: failed
Error: glm-serverless-app-Notes already exists
Stack glm-serverless-app-api
Status: not deployed
Cannot convert undefined or null to object
Greg Martin
11/04/2021, 1:55 PMmessage: 'This stack is currently in a non-terminal [CREATE_FAILED] state. To update the stack from this state, please use the disable-rollback parameter with update-stack API. To rollback to the last known good state, use the rollback-stack API',
thdxr
11/04/2021, 1:57 PMthdxr
11/04/2021, 1:57 PMthdxr
11/04/2021, 1:58 PMGreg Martin
11/04/2021, 1:58 PMthdxr
11/04/2021, 1:59 PMsst start
If that doesn't work try
sst start --rollback=true
Greg Martin
11/04/2021, 2:00 PMGreg Martin
11/04/2021, 2:00 PMGreg Martin
11/04/2021, 2:00 PMGreg Martin
11/04/2021, 2:01 PMGreg Martin
11/04/2021, 2:02 PMregion: "us-east-1"
Greg Martin
11/04/2021, 2:08 PMnpx sst remove
on my stuff and then ran
npx sst start
from the folder associated with his cloned repo. So, I had a remove and a deploy running at the same time. Different folder/project names, but still. That may have been part of the cause of this issue.