perhaps a debug env or something?
# sst
c
perhaps a debug env or something?
j
A couple of things to check here, there should be a debug log generated in the
.build
directory in your project root.
See if something shows up there. Also, does
sst build
work?
c
it does not, so I’ll look in that directory
Copy code
2021-01-18T23:59:08.580Z info: [90mPreparing your SST app[39m
2021-01-18T23:59:08.585Z info: [90mDetected tsconfig.json[39m
2021-01-18T23:59:08.585Z info: [90mTranspiling source[39m
2021-01-18T23:59:08.982Z info: [90mLinting source[39m
2021-01-18T23:59:08.989Z info: [90mRunning type checker[39m
2021-01-18T23:59:08.998Z info:
is all it gives me
basically the same as the console output
j
Can you tell me what your dir structure looks like? It's a monorepo?
c
yes, it is
very much like the setup in the serverless-stack site
j
You are running the sst command inside the
infrastructure
dir?
c
yes
j
Are you also hoisting your node_modules?
c
I’m not using any nohoist settings
from 0.4.3 to this update, only change I’ve made is upgrading to 0.5.0
j
Yeah but there are some internal changes in this update.
c
my two builds on Seed as well
gotcha
j
But it's weird that
sst build
works for you?
Are you running that from the same dir as well?
c
no, neither works
j
Oh okay
c
my v2 build on Seed is where I moved back down to 0.4.3
j
That makes more sense
Let me see if I can reproduce this on my end.
c
okay, thanks
j
Yeah just tried it. There's an issue with finding the linter path when using Yarn workspace. We'll need to push out a fix.
@Chuck Carpenter Just pushed a release with the fix to handle Yarn Workspaces. https://github.com/serverless-stack/serverless-stack/releases/tag/v0.6.0
There was also a bug with the errors not being logged correctly to the debug log, that's being worked on separately and we'll push it in a later release.
c
thanks @Jay appreciate the quick fix!
j
Btw, if you are upgrading from
0.4.x
, you can delete the
build
directory that's generated in the project root. It's been renamed to
.build
.
c
Copy code
[chuckcarpenter:~/Projects/swach/api]$ yarn workspace @swach/infrastructure sst build
yarn workspace v1.22.4
yarn run v1.22.4
$ /Users/chuckcarpenter/Projects/swach/api/node_modules/.bin/sst build
Preparing your SST app
Detected tsconfig.json
Transpiling source
Linting source
Running type checker

There was a problem linting the source.
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
error Command failed.
Exit code: 1
Command: /usr/local/opt/nvm/nvm.sh/versions/node/v12.18.0/bin/node
Arguments: /Users/chuckcarpenter/.yarn/lib/cli.js sst build
Directory: /Users/chuckcarpenter/Projects/swach/api/infrastructure
Output:
looks like it’s still the same result for me
j
Hmm then it might be a different issue. Because my test case with Yarn Workspaces works fine. Just to be sure, you are now using 0.6.0?
c
yeah, made that upgrade
j
We also just pushed out a release, with a fix for the debug log not showing all the info. Maybe try upgrading to that and trying again? https://github.com/serverless-stack/serverless-stack/releases/tag/v0.6.1
so yes, I’ll try that now
Copy code
2021-01-19T23:14:54.712Z debug: SST Error: There was a problem linting the source.
2021-01-19T23:14:54.712Z error: There was a problem linting the source.
progress, but at least it can run
test
now
build
also works
so, I’ll look at my setup otherwise for linting
j
Hmm I'm a bit confused, so it
sst build
runs but it fails on the lint step?
Can you post your full output?
c
Copy code
[chuckcarpenter:~/Projects/swach/api]$ yarn workspace @swach/infrastructure build
yarn workspace v1.22.4
yarn run v1.22.4
$ sst build
Preparing your SST app
Detected tsconfig.json
Transpiling source
Linting source
Running type checker

There was a problem linting the source.
Synthesizing CDK

Successfully compiled 2 stacks to .build/cdk.out:

  dev-swach-infra-cognito
  dev-swach-infra-dynamodb

Run npx sst deploy to deploy to AWS.
✨  Done in 4.42s.
✨  Done in 4.63s.