software-mansion / setup-ci

CLI to spin your CI/CD for react-native!
MIT License
129 stars 1 forks source link

`could not determine executable to run` #124

Closed shtefanilie closed 1 week ago

shtefanilie commented 1 week ago

Describe the bug

Getting could not determine executable to run on a fresh copy of ignite, regardless of choosing expo go, expo CNG or barebones projects. Tested in all cases with both npm and yarn.

Additional context

Simply ran npx ignite-cli@latest new setupCi, went through the setup, and regardless of framework choices (expo or barebones), when trying to run setup-ci it fails with the blow details.

Package manager : npm and yarn OS: macOS 14.5 arm64 Version <!-- (npx setup-ci --version) --> : 0.6.0 Node version <!-- (node --version) -->: 20.10.0

The best would be a link to the repository with problem reproduction, but if you can't provide it, please provide the informations below:

Content of package.json ```bash { "name": "setup-ci", "version": "0.0.1", "private": true, "main": "expo/AppEntry.js", "scripts": { "compile": "tsc --noEmit -p . --pretty", "format": "prettier --write \"app/**/*.{js,jsx,json,md,ts,tsx}\"", "lint": "eslint App.tsx app test --fix --ext .js,.ts,.tsx && npm run format", "patch": "patch-package", "test": "jest", "test:watch": "jest --watch", "test:maestro": "maestro test .maestro/FavoritePodcast.yaml", "adb": "adb reverse tcp:9090 tcp:9090 && adb reverse tcp:3000 tcp:3000 && adb reverse tcp:9001 tcp:9001 && adb reverse tcp:8081 tcp:8081", "postinstall": "patch-package", "bundle:visualize": "npx react-native-bundle-visualizer", "bundle:visualize:dev": "npx react-native-bundle-visualizer --dev", "build:ios:sim": "eas build --profile development --platform ios --local", "build:ios:dev": "eas build --profile development:device --platform ios --local", "build:ios:prod": "eas build --profile production --platform ios --local", "build:android:sim": "eas build --profile development --platform android --local", "build:android:dev": "eas build --profile development:device --platform android --local", "build:android:prod": "eas build --profile production --platform android --local", "start": "npx expo start", "android": "npx expo run:android", "ios": "npx expo run:ios", "web": "npx expo start --web", "bundle:web": "npx expo export --platform web", "serve:web": "npx server dist", "prebuild:clean": "npx expo prebuild --clean" }, "dependencies": { "@expo-google-fonts/space-grotesk": "^0.2.2", "@expo/metro-runtime": "~3.2.1", "@react-native-async-storage/async-storage": "1.23.1", "@react-navigation/bottom-tabs": "^6.3.2", "@react-navigation/native": "^6.0.2", "@react-navigation/native-stack": "^6.0.2", "@shopify/flash-list": "^1.6.4", "apisauce": "3.0.1", "date-fns": "^2.30.0", "expo": "~51.0.8", "expo-application": "~5.9.1", "expo-build-properties": "~0.12.1", "expo-dev-client": "~4.0.14", "expo-font": "~12.0.5", "expo-linking": "~6.3.1", "expo-localization": "~15.0.3", "expo-splash-screen": "~0.27.4", "expo-status-bar": "~1.12.1", "i18n-js": "^4.4.3", "mobx": "6.10.2", "mobx-react-lite": "4.0.5", "mobx-state-tree": "5.3.0", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.74.2", "react-native-drawer-layout": "4.0.0-alpha.9", "react-native-gesture-handler": "~2.16.1", "react-native-reanimated": "~3.10.1", "react-native-safe-area-context": "4.10.1", "react-native-screens": "3.31.1", "react-native-web": "~0.19.6" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/plugin-transform-arrow-functions": "^7.0.0", "@babel/plugin-transform-shorthand-properties": "^7.0.0", "@babel/plugin-transform-template-literals": "^7.0.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@testing-library/react-native": "^12.5.2", "@types/i18n-js": "3.8.2", "@types/jest": "^29.2.1", "@types/react": "~18.2.14", "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "babel-jest": "^29.2.1", "eslint": "8.17.0", "eslint-config-prettier": "8.5.0", "eslint-config-standard": "17.0.0", "eslint-plugin-import": "2.26.0", "eslint-plugin-n": "^15.0.0", "eslint-plugin-promise": "6.0.0", "eslint-plugin-react": "7.30.0", "eslint-plugin-react-native": "4.0.0", "eslint-plugin-reactotron": "^0.1.2", "jest": "^29.2.1", "jest-expo": "~51.0.2", "patch-package": "^8.0.0", "postinstall-prepare": "1.0.1", "prettier": "2.8.8", "react-test-renderer": "18.2.0", "reactotron-core-client": "^2.8.13", "reactotron-mst": "^3.1.7", "reactotron-react-js": "^3.3.11", "reactotron-react-native": "^5.0.5", "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "typescript": "~5.3.3" }, "engines": { "node": ">=18" }, "prettier": { "printWidth": 100, "semi": false, "singleQuote": false, "trailingComma": "all" }, "eslintConfig": { "root": true, "parser": "@typescript-eslint/parser", "extends": [ "plugin:@typescript-eslint/recommended", "plugin:react/recommended", "plugin:react-native/all", "standard", "prettier" ], "plugins": [ "@typescript-eslint", "react", "react-native", "reactotron" ], "parserOptions": { "ecmaFeatures": { "jsx": true } }, "settings": { "react": { "pragma": "React", "version": "detect" } }, "globals": { "__DEV__": false, "jasmine": false, "beforeAll": false, "afterAll": false, "beforeEach": false, "afterEach": false, "test": false, "expect": false, "describe": false, "jest": false, "it": false }, "rules": { "@typescript-eslint/ban-ts-ignore": 0, "@typescript-eslint/ban-ts-comment": 0, "@typescript-eslint/explicit-function-return-type": 0, "@typescript-eslint/explicit-member-accessibility": 0, "@typescript-eslint/explicit-module-boundary-types": 0, "@typescript-eslint/indent": 0, "@typescript-eslint/member-delimiter-style": 0, "@typescript-eslint/no-empty-interface": 0, "@typescript-eslint/no-explicit-any": 0, "@typescript-eslint/no-object-literal-type-assertion": 0, "@typescript-eslint/no-var-requires": 0, "@typescript-eslint/no-unused-vars": [ "error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" } ], "comma-dangle": 0, "multiline-ternary": 0, "no-undef": 0, "no-unused-vars": 0, "no-use-before-define": 0, "no-global-assign": 0, "quotes": 0, "react-native/no-raw-text": 0, "react/no-unescaped-entities": 0, "react/prop-types": 0, "space-before-function-paren": 0, "reactotron/no-tron-in-production": "error" } } } ```
Output of ls command ```bash App.tsx assets metro.config.js react-native.config.js README.md babel.config.js node_modules test app eas.json package.json tsconfig.json app.config.ts ignite patches types app.json jest.config.js plugins ```
Output of npx setup-ci command ```bash npm ERR! could not determine executable to run npm ERR! A complete log of this run can be found in: /Users/.npm/_logs/2024-10-09T21_34_28_643Z-debug-0.log ```
Content of 2024-10-09T21_34_28_643Z-debug-0.log 0 verbose cli /Users/stefanilie/.asdf/installs/nodejs/20.10.0/bin/node /Users/stefanilie/.asdf/installs/nodejs/20.10.0/lib/node_modules/npm/bin/npm-cli.js 1 info using npm@10.2.3 2 info using node@v20.10.0 3 timing npm:load:whichnode Completed in 0ms 4 timing config:load:defaults Completed in 0ms 5 timing config:load:file:/Users/stefanilie/.asdf/installs/nodejs/20.10.0/lib/node_modules/npm/npmrc Completed in 1ms 6 timing config:load:builtin Completed in 1ms 7 timing config:load:cli Completed in 1ms 8 timing config:load:env Completed in 0ms 9 timing config:load:file:/Users/stefanilie/Projects/setupCi/.npmrc Completed in 1ms 10 timing config:load:project Completed in 2ms 11 timing config:load:file:/Users/stefanilie/.npmrc Completed in 0ms 12 timing config:load:user Completed in 0ms 13 timing config:load:file:/Users/stefanilie/.asdf/installs/nodejs/20.10.0/etc/npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:setEnvs Completed in 0ms 16 timing config:load Completed in 4ms 17 timing npm:load:configload Completed in 4ms 18 timing config:load:flatten Completed in 1ms 19 timing npm:load:mkdirpcache Completed in 0ms 20 timing npm:load:mkdirplogs Completed in 0ms 21 verbose title npm exec setup-ci 22 verbose argv "exec" "--" "setup-ci" 23 timing npm:load:setTitle Completed in 5ms 24 timing npm:load:display Completed in 0ms 25 verbose logfile logs-max:10 dir:/Users/stefanilie/.npm/_logs/2024-10-09T21_34_28_643Z- 26 verbose logfile /Users/stefanilie/.npm/_logs/2024-10-09T21_34_28_643Z-debug-0.log 27 timing npm:load:logFile Completed in 4ms 28 timing npm:load:timers Completed in 0ms 29 timing npm:load:configScope Completed in 0ms 30 timing npm:load Completed in 22ms 31 silly logfile start cleaning logs, removing 1 files 32 silly logfile done cleaning log files 33 timing arborist:ctor Completed in 1ms 34 timing command:exec Completed in 9ms 35 verbose stack Error: could not determine executable to run 35 verbose stack at getBinFromManifest (/Users/stefanilie/.asdf/installs/nodejs/20.10.0/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23) 35 verbose stack at exec (/Users/stefanilie/.asdf/installs/nodejs/20.10.0/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:188:15) 35 verbose stack at async module.exports (/Users/stefanilie/.asdf/installs/nodejs/20.10.0/lib/node_modules/npm/lib/cli-entry.js:61:5) 36 verbose pkgid setup-ci@0.0.1 37 verbose cwd /Users/stefanilie/Projects/setupCi 38 verbose Darwin 23.5.0 39 verbose node v20.10.0 40 verbose npm v10.2.3 41 error could not determine executable to run 42 verbose exit 1 43 timing npm Completed in 94ms 44 verbose code 1 45 error A complete log of this run can be found in: /Users/stefanilie/.npm/_logs/2024-10-09T21_34_28_643Z-debug-0.log
maciekstosio commented 1 week ago

Hi! I think it's a name clash - npx ignite-cli@latest new setupCi will generate a project with name: "setup-ci", so when running npx setup-ci it will try to run your project's bin. Could you try with a different name for the app and let me know if that works?

shtefanilie commented 1 week ago

Yep, that was the case 🙃! Thanks