Hey guys, I’m using Lerna + Yarn, and had to disab...
# sst
a
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
Did you disable hoisting globally or just for your react app
a
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
I'm not super familiar with how our eslint integration works but you can disable hoisting on just one sub package
One second
a
Ok that would be nice to do.
Something in here might be helpful
a
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
😞