You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npx react-native@latest init project1 --version 0.71.0
cd project1
npx react-native-macos-init
Launched it with npx react-native run-macos - so far so good. Did a bit of work on it trying to get some old react components to work, ran into an issue, decided to start over. To be specific I had tried to import @reduxjs/toolkit which was somehow not being found and so the app barfed before it even instantiated <App>. So i backed up and made a totally unrelated project:
npx react-native@latest init project2--version 0.71.0
cd project2
npx react-native-macos-init
However now when I try to launch project2 with npx react-native run-macos the app window comes up and i get an error about how it cannot find @reduxjs/toolkit when it tries to compile source code that lives in the project1 directory tree???
Expected Behavior
I expect a new project to have absolutely no dependency or relationship of any kind to the old project.
Actual Behavior
I have repeated this now with several new projects and the result is always the same - no matter what project i create or where i create it the react-native app that comes up when i run npx react-native run-macos is always trying to run code in project1 (and failing because of a reference to @reduxjs/toolkit)
i scanned my environment for any weird env vars, found nothing. at a loss as to how to proceed here.
Reproducible Demo
The default project that gets built by npx react-native@latest init project2 --version 0.71.0 reproduces this just fine.
Additional context
No response
The text was updated successfully, but these errors were encountered:
I just tried to make yet another new project after moving project1 out of the way and now I at least get a more descriptive error even though it's still trying to run code from project:
Metro has encountered an error: ENOENT no such file or directory, lstat '/Users/uzor/work/project1': node:fs (2702:29)
this was caused by (at a minimum) metro bundler failing to exit after being launched the first time which is unexpected. unclear if that's really the fault of react-native-macos but it was definitely unexpected behavior for a newcomer.
if anyone else runs into this issue you can (usually) find the process ID of metro bundler by looking to see if any processes are holding port 8081 (metro bundler's default port) with lsof -t -i :8081
Environment
Steps to reproduce the bug
I created a new project:
npx react-native@latest init project1 --version 0.71.0 cd project1 npx react-native-macos-init
Launched it with
npx react-native run-macos
- so far so good. Did a bit of work on it trying to get some old react components to work, ran into an issue, decided to start over. To be specific I had tried to import@reduxjs/toolkit
which was somehow not being found and so the app barfed before it even instantiated<App>
. So i backed up and made a totally unrelated project:npx react-native@latest init project2--version 0.71.0 cd project2 npx react-native-macos-init
However now when I try to launch
project2
withnpx react-native run-macos
the app window comes up and i get an error about how it cannot find@reduxjs/toolkit
when it tries to compile source code that lives in theproject1
directory tree???Expected Behavior
I expect a new project to have absolutely no dependency or relationship of any kind to the old project.
Actual Behavior
I have repeated this now with several new projects and the result is always the same - no matter what project i create or where i create it the react-native app that comes up when i run
npx react-native run-macos
is always trying to run code inproject1
(and failing because of a reference to@reduxjs/toolkit
)i scanned my environment for any weird env vars, found nothing. at a loss as to how to proceed here.
Reproducible Demo
The default project that gets built by
npx react-native@latest init project2 --version 0.71.0
reproduces this just fine.Additional context
No response
The text was updated successfully, but these errors were encountered: