expo: create-expo-module fails in installing module dependencies stage

Summary

Creating a module with npx create-expo-module fails in installing module dependencies stage.

What platform(s) does this occur on?

Android, iOS

SDK Version

No response

Environment

expo-env-info 1.0.5 environment info: System: OS: macOS 13.0.1 Shell: 5.8.1 - /bin/zsh Binaries: Node: 14.15.0 - ~/.nvm/versions/node/v14.15.0/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 6.14.8 - ~/.nvm/versions/node/v14.15.0/bin/npm Watchman: 2022.09.19.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9014738 Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild

Minimal reproducible example

create a new module with npx create-expo-module, it fails in Installing module dependencies stage with following message.

✔ Downloaded module template from npm
✔ Created the module from template files
✔ Created an empty Git repository
✖ Installing module dependencies
Error: yarn exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/user/.npm/_npx/79332/lib/node_modules/create-expo-module/node_modules/@expo/spawn-async/build/spawnAsync.js:41:23)
    at Object.onceWrapper (events.js:422:26)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1048:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
    ...
    at spawnAsync (/Users/user/.npm/_npx/79332/lib/node_modules/create-expo-module/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at installDependencies (/Users/user/.npm/_npx/79332/lib/node_modules/create-expo-module/build/packageManager.js:9:37)
    at /Users/user/.npm/_npx/79332/lib/node_modules/create-expo-module/build/create-expo-module.js:74:56
    at newStep (/Users/user/.npm/_npx/79332/lib/node_modules/create-expo-module/build/utils.js:21:22)
    at Command.main (/Users/user/.npm/_npx/79332/lib/node_modules/create-expo-module/build/create-expo-module.js:73:31)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  pid: 79355,
  output: [ '', '' ],
  stdout: '',
  stderr: '',
  status: 1,
  signal: null
}

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 8
  • Comments: 18 (2 by maintainers)

Most upvoted comments

it looks like you may be using an old version of create-expo-module. npx is pretty janky when it comes to caching. i recommend running npx create-expo-module@latest to ensure you get the latest version. yarn create expo-module is much more reliable. let me know if this doesn’t fix the issue for you

Still an issue

npx create-expo-module@latest myModule

Node: v20.11.0 Pnpm: v9.0.3 (and others)

✔ Downloaded module template from npm
✔ Created the module from template files
✖ Installing module dependencies
Error: npm install exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/XX/.npm/_npx/df6d79204f77d516/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
    at Object.onceWrapper (node:events:633:26)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
    ...
    at spawnAsync (/Users/XX/.npm/_npx/df6d79204f77d516/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at installDependencies (/Users/XX/.npm/_npx/df6d79204f77d516/node_modules/create-expo-module/build/packageManager.js:9:37)
    at /Users/XX/.npm/_npx/df6d79204f77d516/node_modules/create-expo-module/build/create-expo-module.js:86:60
    at newStep (/Users/XX/.npm/_npx/df6d79204f77d516/node_modules/create-expo-module/build/utils.js:21:22)
    at Command.main (/Users/XX/.npm/_npx/df6d79204f77d516/node_modules/create-expo-module/build/create-expo-module.js:85:35) {
  pid: 59603,
  output: [ '', '' ],
  stdout: '',
  stderr: '',
  status: 1,
  signal: null
}

Still having the same issue on this.

Ubuntu 22.04.2 LTS

npm --version
9.6.4

yarn --version
3.5.0

node --version
v18.15.0

Did anyone find a way to fix that issue ?

I have gotten a headache from this error but I finally figured out how to make it work Solution: You can run npx create-expo-module from the WSL (just open Linux shell in your desired location).