cli
cli copied to clipboard
Cannot run program "npx": error=2, No such file or directory
Environment
OS: macOS 12.1
CPU: (8) arm64 Apple M1 Pro
Memory: 169.41 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.4.0 - /opt/homebrew/bin/node
Yarn: 1.22.17 - /opt/homebrew/bin/yarn
npm: 6.9.0 - ~/workspace/wtapp-react/node_modules/.bin/npm
Watchman: 2022.01.17.00 - /opt/homebrew/bin/watchman
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7935034
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
Description
:ReactNative:Running 'npx --quiet --no-install react-native config' command from 'null' directory failed.
FAILURE: Build failed with an exception.
* Where:
Script '/Users/chenlong/workspace/wtapp-react/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 154
* What went wrong:
A problem occurred evaluating script.
> Cannot run program "npx": error=2, No such file or directory
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 332ms
I've the same issue. Any help?
I got the same issue when upgraded Android Studio to the latest version 12.1.1
Same here when upgraded Android Studio to Bumblebee (2021.1.1)
It seems like Android Studio Bumblebee no more reads shell environment from .zshenv/.bashrc/etc... files as a result it run gradle with system PATHs. Here bug report and some solutions: https://issuetracker.google.com/issues/216364005?pli=1
And for lazy: chmod +x /Applications/Android\ Studio.app/Contents/bin/printenv
, then restart Android Studio
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.