Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New inited app not working with pnpm installion #39167

Closed
linonetwo opened this issue Aug 26, 2023 · 3 comments
Closed

New inited app not working with pnpm installion #39167

linonetwo opened this issue Aug 26, 2023 · 3 comments
Labels
Resolution: Answered When the issue is resolved with a simple answer

Comments

@linonetwo
Copy link

Description

Error

None of these files exist:
  * node_modules/expo/AppEntry

while node_modules/expo/AppEntry.js turely exists.

I think this is because it can't follow pnpm's soft link. I try using npm install and it works.

Full error:

pnpm run android

> [email protected] android /Users/linonetwo/Desktop/repo/TidGi-Mobile
> expo start --android

Starting project at /Users/linonetwo/Desktop/repo/TidGi-Mobile
Starting Metro Bundler
warning: Watchman `watch-project` returned a warning: Recrawled this watch 3 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/linonetwo/Desktop/repo/TidGi-Mobile' ; watchman watch-project '/Users/linonetwo/Desktop/repo/TidGi-Mobile'`

warning: Watchman `query` returned a warning: Recrawled this watch 3 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/linonetwo/Desktop/repo/TidGi-Mobile' ; watchman watch-project '/Users/linonetwo/Desktop/repo/TidGi-Mobile'`

Recrawled this watch 3 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/linonetwo/Desktop/repo/TidGi-Mobile' ; watchman watch-project '/Users/linonetwo/Desktop/repo/TidGi-Mobile'`

› Opening exp://192.168.3.15:8081 on SHARK_KTUS_A0
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█ ▄▄▄▄▄ █▄▀▀▄▄ ██ █ ▄▄▄▄▄ █
█ █   █ ███▄█   ▄▄█ █   █ █
█ █▄▄▄█ ██▄▀▄▀ ██▀█ █▄▄▄█ █
█▄▄▄▄▄▄▄█ █ ▀▄▀ ▀ █▄▄▄▄▄▄▄█
█▄▄▀ ▄▀▄██ ▄▄▀▀█▀ █▄█▀█▀▀▄█
█   █ ▀▄█ ▀  ▀█▄  ▀███▄▀▀ █
█▀▀█ ▄▄▄▄▀▄█▄▄▀▄ █ ▄▀▀█▀ ██
█ ▄▀█▀▀▄ ██▄ ▄▄▀ ▄▀ ██▄▀  █
█▄█▄▄██▄▄ ▄▀▀▀  █ ▄▄▄  ▄▀▄█
█ ▄▄▄▄▄ ██▀▄▄▀  █ █▄█ ██▀▄█
█ █   █ █ ▀ █▄██▄ ▄  ▄ █  █
█ █▄▄▄█ █▀▄ █▄█  ▄█▀▀▄█   █
█▄▄▄▄▄▄▄█▄███▄▄▄▄▄▄█▄▄███▄█

› Metro waiting on exp://192.168.3.15:8081
› Scan the QR code above with Expo Go (Android) or the Camera app (iOS)

› Using Expo Go
› Press s │ switch to development build

› Press a │ open Android
› Press i │ open iOS simulator
› Press w │ open web

› Press j │ open debugger
› Press r │ reload app
› Press m │ toggle menu
› Press o │ open project code in your editor

› Press ? │ show all commands

Logs for your project will appear below. Press Ctrl+C to exit.
Error: Unable to resolve module ./node_modules/expo/AppEntry from /Users/linonetwo/Desktop/repo/TidGi-Mobile/.:

None of these files exist:
  * node_modules/expo/AppEntry(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
  * node_modules/expo/AppEntry/index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
    at ModuleResolver.resolveDependency (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:114:15)
    at DependencyGraph.resolveDependency (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/node-haste/DependencyGraph.js:277:43)
    at /Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/lib/transformHelpers.js:169:21
    at Server._resolveRelativePath (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/Server.js:1045:12)
    at async Server.requestProcessor [as _processBundleRequest] (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/Server.js:449:37)
    at async Server._processRequest (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/Server.js:383:7)
Error: Unable to resolve module ./node_modules/expo/AppEntry from /Users/linonetwo/Desktop/repo/TidGi-Mobile/.:

None of these files exist:
  * node_modules/expo/AppEntry(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
  * node_modules/expo/AppEntry/index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
    at ModuleResolver.resolveDependency (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:114:15)
    at DependencyGraph.resolveDependency (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/node-haste/DependencyGraph.js:277:43)
    at /Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/lib/transformHelpers.js:169:21
    at Server._resolveRelativePath (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/Server.js:1045:12)
    at async Server.requestProcessor [as _processBundleRequest] (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/Server.js:449:37)
    at async Server._processRequest (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/Server.js:383:7)
Error: Unable to resolve module ./node_modules/expo/AppEntry from /Users/linonetwo/Desktop/repo/TidGi-Mobile/.:

None of these files exist:
  * node_modules/expo/AppEntry(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
  * node_modules/expo/AppEntry/index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
    at ModuleResolver.resolveDependency (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:114:15)
    at DependencyGraph.resolveDependency (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/node-haste/DependencyGraph.js:277:43)
    at /Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/lib/transformHelpers.js:169:21
    at Server._resolveRelativePath (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/Server.js:1045:12)
    at async Server.requestProcessor [as _processBundleRequest] (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/Server.js:449:37)
    at async Server._processRequest (/Users/linonetwo/Desktop/repo/TidGi-Mobile/node_modules/.pnpm/[email protected]/node_modules/metro/src/Server.js:383:7)
› Stopped server

React Native Version

0.72.4

Output of npx react-native info

info Fetching system and libraries information...
System:
OS: macOS 13.5
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 54.77 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.2.0
path: ~/.nvm/versions/node/v20.2.0/bin/node
Yarn:
version: 1.22.4
path: /usr/local/bin/yarn
npm:
version: 9.6.6
path: ~/.nvm/versions/node/v20.2.0/bin/npm
Watchman:
version: 2023.08.14.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /Users/linonetwo/.gem/ruby/2.6.0/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9514443
Xcode:
version: 14.3.1/14E300c
path: /usr/bin/xcodebuild
Languages:
Java:
version: 20.0.2
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.4
wanted: 0.72.4
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found

Steps to reproduce

pnpm dlx create-expo-app -t expo-template-blank-typescript TidGi-Mobile

And using pnpm run android

Snack, screenshot, or link to a repository

Just use an official blank setup is enough.

@github-actions github-actions bot added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Aug 26, 2023
@github-actions
Copy link

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

@cortinico
Copy link
Contributor

This is a known issue, @byCedric @robhogan and others are currently working on pnpm support.
If you search for pnpm on other repos you'll find related issues to this problem as well (such as react-native-community/cli#1207).

I'll close this one as we're aware of the issue and currently working on it, we won't be using this specific bug report to track this effort.

@cortinico cortinico added Resolution: Answered When the issue is resolved with a simple answer and removed Needs: Triage 🔍 Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Sep 11, 2023
@linonetwo
Copy link
Author

linonetwo commented Sep 11, 2023

Okay, and I already get it work somehow, by following those discussion threads, thanks.

By adding this npmrc https://github.com/tiddly-gittly/TidGi-Mobile/blob/master/.npmrc

just an workaround before the official fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Answered When the issue is resolved with a simple answer
Projects
None yet
Development

No branches or pull requests

2 participants