Cannot find module 'expo-modules-autolinking'

See original GitHub issue

Summary

When building the app it fails with the following error:

Cannot find module 'expo-modules-autolinking'

In my current application I followed all the steps given by @byCedric in https://github.com/expo/expo/issues/13475#issuecomment-877296024 without success.

I also tried on a bare-new (bare) app.

react-native-adapter version:

$ grep react-native-adapter yarn.lock -A 1                                                                                                                    main *
"@unimodules/react-native-adapter@~6.3.3", "@unimodules/react-native-adapter@~6.3.4":
  version "6.3.4"

Node version

$ node --version
v14.17.0

OS: BigSur on a Macbookpro with M1

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

bare

What platform(s) does this occur on?

Android

SDK Version (managed workflow only)

No response

Environment

$ expo diagnostics                                                                                                                                            main *

  Expo CLI 4.7.3 environment info:
    System:
      OS: macOS 11.4
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.17.0 - /opt/homebrew/bin/node
      Yarn: 1.22.10 - /opt/homebrew/bin/yarn
      npm: 6.14.13 - /opt/homebrew/bin/npm
      Watchman: 4.9.0 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.10.1 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    IDEs:
      Android Studio: EAP AI-203.7717.56.2031.7479365 AI-203.7717.56.2031.7479365
      Xcode: 12.3/12C33 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~42.0.1 => 42.0.1 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: ~0.63.4 => 0.63.4 
      react-native-web: ~0.13.12 => 0.13.18 
    npmGlobalPackages:
      expo-cli: 4.7.3
    Expo Workflow: bare

Reproducible demo or steps to reproduce from a blank project

Create an initial app with:

tkr ~/projects/tmp $ expo init                                                                                                                                          ispravljanje-originalne-verzije *
✔ What would you like to name your app? … expo-playground-2
✔ Choose a template: › blank (TypeScript)  same as blank but with TypeScript configuration
✔ Downloaded and extracted project files.
🧶 Using Yarn to install packages. Pass --npm to use npm instead.
✔ Installed JavaScript dependencies.

✅ Your project is ready!

To run your project, navigate to the directory and run one of the following yarn commands.

- cd expo-playground-2
- yarn start # you can open iOS, Android, or web from here, or run them directly with the commands below.
- yarn android
- yarn ios
- yarn web

Then eject:

tkr ~/projects/tmp $ cd expo-playground-2                                                                                                                               tkr ~/projects/tmp/expo-playground-2 $ expo eject                                                                                                                                                    Your git working tree is clean
To revert the changes after this command completes, you can run the following:
  git clean --force && git reset --hard

📝  Android package Learn more: https://expo.fyi/android-package

✔ What would you like your Android package name to be? … com.tkrajina.expoplayground2
📝  iOS Bundle Identifier Learn more: https://expo.fyi/bundle-identifier

✔ What would you like your iOS bundle identifier to be? … com.tkrajina.expoplayground2
✔ Created native projects
✔ Added Metro config.
✔ Updated package.json and added index.js entry point for iOS and Android.
› Removed "main": "node_modules/expo/AppEntry.js" from package.json because we recommend using index.js as main instead.

🧶 Using Yarn to install packages. Pass --npm to use npm instead.
✔ Cleaned JavaScript dependencies.
✔ Installed JavaScript dependencies.
⠙ Config syncing
Using node to generate images. This is much slower than using native packages.
› Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.

✔ Config synced
✔ Installed pods and initialized Xcode workspace.

➡️  Next steps
› 💡 You may want to run npx @react-native-community/cli doctor to help install any tools that your app may need to run your native projects.
› 🔑 Download your Android keystore (if you're not sure if you need to, just run the command and see): expo fetch:android:keystore
› 📁 The property assetBundlePatterns does not have the same effect in the bare workflow.
  Learn more: https://docs.expo.io/bare/updating-your-app/#embedding-assets

☑️  When you are ready to run your project
To compile and run your project in development, execute one of the following commands:
› yarn ios
› yarn android
› yarn web

Then, when building it from android studio:

Screenshot 2021-07-12 at 09 32 39

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

7reactions
tsapetacommented, Aug 7, 2021

Yes, I confirm this issue may happen on M1 devices with Gradle older than 6.9 — which is the first version with native support for Apple Silicon so it’s worth upgrading either way, just like I did in this repo here #13929

5reactions
RodolfoGScommented, Aug 7, 2021

I have the same issue after updating Android Studio to the latest version (2020.3.1). Also on M1 Big Sur.

Edit: Fixed after upgrading gradle to 6.9

Read more comments on GitHub >

github_iconTop Results From Across the Web

expo-modules-autolinking - npm
Start using expo-modules-autolinking in your project by running `npm i ... 7 other projects in the npm registry using expo-modules-autolinking.
Read more >
expo-modules-autolinking - npm package - Snyk
The npm package expo-modules-autolinking was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as ......
Read more >
Error: `expo-modules-core` project is not included by autolinking
I can't solve successfully build the project anymore. Seems like the main issue here is Error: expo-modules-core project is not included by ...
Read more >
expo-modules-autolinking | Yarn - Package Manager
For 1.x docs, see classic.yarnpkg.com. ... Scripts that autolink Expo modules. ... This version does not introduce any user-facing changes.
Read more >
Expo-modules-autolinking - npm.io
Check Expo-modules-autolinking 0.10.3 package - Last release 0.10.3 with MIT licence at our NPM packages aggregator and search engine.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found