Skip to content

addNohoistAliases() problem with React Native for Web #16

@alxroyer

Description

@alxroyer

While following https://mmazzarolo.com/blog/2021-09-22-running-react-native-everywhere-web/,

I had to comment the addNohoistAliases() call in my craco.config.js file,

otherwise I got the following error:

ERROR in ./src/index.js 4:0-26
Module not found: Error: You attempted to import ...\packages\web\node_modules\react which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.

Configuration:

  • @craco/craco@6.4.5
  • create-react-app@5.0.1
  • react@18.2.0
  • react-dom@18.2.0
  • react-native-monorepo-tools@1.2.0
  • react-native-web@0.18.8
  • webpack@5.74.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions