expo / expo-cli

Tools for creating, running, and deploying universal Expo and React Native apps
https://docs.expo.io/workflow/expo-cli/
2.61k stars 478 forks source link

error trying to publish app #829

Closed appjitsu closed 5 years ago

appjitsu commented 5 years ago

Description

error trying to publish app. was all working before. i even tried: $ rm -rf .expo && rm -rf node_modules && npm cache clean --force && npm install

Expected Behavior

export EXPO_DEBUG=true && expo publish

Observed Behavior

Unable to find an existing Expo CLI instance for this directory, starting a new one...
Starting Metro Bundler on port 19001.
Successfully ran `adb reverse`. Localhost URLs should work on the connected Android device.
Tunnel ready.
Publishing to channel 'default'...
Building iOS bundle
Metro Bundler has encountered an internal error, please check your terminal error output for more details
jest-haste-map: @providesModule naming collision:
  Duplicate module name: react-native
  Paths: /Users/jason/SynologyDrive/greenhouse-tracker/app/node_modules/@rimiti/react-native-toastify/node_modules/react-native/package.json collides with /Users/jason/SynologyDrive/greenhouse-tracker/app/node_modules/react-native/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
::ffff:127.0.0.1 - - [09/Jul/2019:19:25:47 +0000] "GET /node_modules/expo/AppEntry.bundle?dev=false&minify=true&hot=false&assetPlugin=%2FUsers%2Fjason%2FSynologyDrive%2Fgreenhouse-tracker%2Fapp%2Fnode_modules%2Fexpo%2Ftools%2FhashAssetFiles.js&platform=ios HTTP/1.1" 500 - "-" "axios/0.19.0-beta.1"
(node:37803) UnhandledPromiseRejectionWarning: Error: jest-haste-map: @providesModule naming collision:
  Duplicate module name: react-native
  Paths: /Users/jason/SynologyDrive/greenhouse-tracker/app/node_modules/@rimiti/react-native-toastify/node_modules/react-native/package.json collides with /Users/jason/SynologyDrive/greenhouse-tracker/app/node_modules/react-native/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
    at setModule (/Users/jason/SynologyDrive/greenhouse-tracker/app/node_modules/react-native/node_modules/jest-haste-map/build/index.js:462:17)
    at workerReply (/Users/jason/SynologyDrive/greenhouse-tracker/app/node_modules/react-native/node_modules/jest-haste-map/build/index.js:512:9)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:37803) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:37803) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Cannot read property 'status' of undefined
TypeError: Cannot read property 'status' of undefined
    at _getForPlatformAsync (/@expo/xdl@55.0.14/src/Project.js:163:70)
    at process._tickCallback (internal/process/next_tick.js:68:7)
Building JavaScript bundle [ 

Environment

Expo CLI 2.21.2 environment info:
    System:
      OS: macOS 10.14.5
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
      Yarn: 1.16.0 - ~/.yarn/bin/yarn
      npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5522156
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^32.0.0 => 32.0.6 
      react: 16.5.0 => 16.5.0 
      react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1 
      react-navigation: ^3.3.0 => 3.11.0 
    npmGlobalPackages:
      expo-cli: 2.21.2

Also specify:

Reproducible Demo

none

ide commented 5 years ago

This looks like an issue with your deps. Do some standard node_module detective work to figure out why this is happening: Paths: /Users/jason/SynologyDrive/greenhouse-tracker/app/node_modules/@rimiti/react-native-toastify/node_modules/react-native/package.json collides with /Users/jason/SynologyDrive/greenhouse-tracker/app/node_modules/react-native/package.json