https://serverless-stack.com/ logo
#sst
Title
# sst
a

Adrián Mouly

10/02/2021, 9:41 PM
Hey guys, I’m using Lerna + Yarn, and had to disable hoisting due I’m having some issues with my React apps. I’m trying some things to get this resolved. But once I disable hoisting, I’m getting the follwing error:
Copy code
SST: 0.44.0
CDK: 1.124.0
Using stage: dev
Preparing your SST app
Detected tsconfig.json
Transpiling source
Linting source
Error: Cannot find module 'eslint'
Require stack:
- /Users/xxx/Projects/xxx/xxx-serverless/.build/eslint.js
t

thdxr

10/02/2021, 9:51 PM
Did you disable hoisting globally or just for your react app
a

Adrián Mouly

10/02/2021, 9:51 PM
Globally.
Due I’m not sure what’s the problem yet.
I have 2 react apps, and uses different react version.
I’m guessing that’s the problem.
I did this on my main package.json:
Copy code
"workspaces": {
    "packages": [
      "frontend/*",
      "infrastructure/src/",
      "backend/src/services/*",
      "backend/src/packages/*"
    ],
    "nohoist": [
      "**"
    ]
  },
But why SST would depend on hosting?
Can I disable hoisting for one specific folder?
t

thdxr

10/02/2021, 10:32 PM
I'm not super familiar with how our eslint integration works but you can disable hoisting on just one sub package
One second
a

Adrián Mouly

10/02/2021, 10:32 PM
Ok that would be nice to do.
Something in here might be helpful
a

Adrián Mouly

10/02/2021, 10:35 PM
Ok checking.
Apparently I can add the
nohoist
on each child package, right?
I’ve tried that but doesn’t look to make a difference.
Added on my frontend packages:
Copy code
"workspaces": {
    "nohoist": [
      "**/**"
    ]
  },
No luck having
nohoist
😞