-
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
Type: EnhancementEnhancements to existing featuresEnhancements to existing features
Description
Describe the problem
Currently, the "detect" logic of react version is using module.createRequire(import.meta.url)
or module.createRequire(process.cwd() + path.sep )
at packages/shared/src/_require.ts. And in a monorepo enviroment, when linting a file in a sub project from the project root directory, it will try to resolve react version in the from the project root:
# in ./ (project root)
npx eslint apps/xyz/App.tsx # this will create a `_require` that tries to resolve `./node_modules/react`
However, the actual react version it should resolve to is apps/node_modules/react
...
Describe the solution you'd like
No response
Alternatives considered
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type: EnhancementEnhancements to existing featuresEnhancements to existing features