electrode-io / electrode-native

A platform to ease integration&delivery of React Native apps in existing mobile applications
https://native.electrode.io
Other
727 stars 113 forks source link

'ern create-miniapp' comand giving error -> "No matching version found for react-native@0.49.3" #177

Closed sachinjha1 closed 7 years ago

sachinjha1 commented 7 years ago

ern create-miniapp is failing due to wrong version of react-native in lookup. There is no 0.49.3 version of react-native right now. But it seems ern is looking for that. See error below. BTW in my system i do have react-native installed separately.

m-c02sx4qwgtdy:ern s2jha$ mkdir ElectrodeNativeTutorial
m-c02sx4qwgtdy:ern s2jha$ ern create-miniapp MovieListMiniApp
 ___ _        _               _       _  _      _   _
| __| |___ __| |_ _ _ ___  __| |___  | \| |__ _| |_(_)_ _____
| _|| / -_) _|  _| '_/ _ \/ _` / -_) | .` / _` |  _| \ V / -_)
|___|_\___\__|\__|_| \___/\__,_\___| |_|\_\__,_|\__|_|\_/\___|
[v0.8.0] [Cauldron: -NONE-]

NPM does not allow package names containing upper case letters.
? Type package name to publish to npm. Press Enter to use the default. movie-list-mini-app
Creating MovieListMiniApp MiniApp
✔ Retrieving react-native version from Manifest
✖ Error: Command failed: /Users/s2jha/.ern/versions/0.8.0/node_modules/.bin/react-native init MovieListMiniApp --version react-native@0.49.3 --skip-jest
npm ERR! code ETARGET
npm ERR! notarget No matching version found for react-native@0.49.3
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/s2jha/.npm/_logs/2017-10-11T10_39_32_704Z-debug.log
{ Error: Command failed: npm install --save --save-exact react-native@0.49.3
    at checkExecSyncError (child_process.js:481:13)
    at execSync (child_process.js:521:13)
    at run (/Users/s2jha/.ern/versions/0.8.0/node_modules/react-native-cli/index.js:294:5)
    at createProject (/Users/s2jha/.ern/versions/0.8.0/node_modules/react-native-cli/index.js:249:3)
    at init (/Users/s2jha/.ern/versions/0.8.0/node_modules/react-native-cli/index.js:200:5)
    at Object.<anonymous> (/Users/s2jha/.ern/versions/0.8.0/node_modules/react-native-cli/index.js:153:7)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
  error: null,
  cmd: 'npm install --save --save-exact react-native@0.49.3',
  file: '/bin/sh',
  args:
   [ '/bin/sh',
     '-c',
     'npm install --save --save-exact react-native@0.49.3' ],
  options:
   { stdio: [ [Object], [Object], [Object] ],
     shell: true,
     file: '/bin/sh',
     args:
      [ '/bin/sh',
        '-c',
        'npm install --save --save-exact react-native@0.49.3' ],
     envPairs:
      [ 'TERM_PROGRAM=iTerm.app',
        'NVM_CD_FLAGS=',
        'SHELL=/bin/bash',
        'TERM=xterm-256color',
        'TMPDIR=/var/folders/72/wk6dblfd125dq4c3ssz8c68rwbk8sn/T/',
        'Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.2nNtidK0Tx/Render',
        'TERM_PROGRAM_VERSION=3.1.3',
        'TERM_SESSION_ID=w0t0p0:6A447267-AA42-4AAB-B441-95E1A73315A9',
        'USER=s2jha',
        'NVM_DIR=/Users/s2jha/.nvm',
        'http_proxy=http://gec-proxy-svr.homeoffice.wal-mart.com:8080/',
        'COMMAND_MODE=unix2003',
        'SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.Ko1A8eqyj5/Listeners',
        '__CF_USER_TEXT_ENCODING=0x38B92335:0x0:0x0',
        'PATH=/Users/s2jha/.nvm/versions/node/v6.11.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/bin:/usr/local/apache-maven/apache-maven-3.3.9/bin',
        '_=/Users/s2jha/.ern/versions/0.8.0/node_modules/.bin/react-native',
        'PWD=/Users/s2jha/Documents/workspaces/ern',
        'JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home',
        'LANG=en_US.UTF-8',
        'ITERM_PROFILE=Default',
        'XPC_FLAGS=0x0',
        'https_proxy=http://gec-proxy-svr.homeoffice.wal-mart.com:8080/',
        'XPC_SERVICE_NAME=0',
        'COLORFGBG=7;0',
        'HOME=/Users/s2jha',
        'SHLVL=2',
        'M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9',
        'ITERM_SESSION_ID=w0t0p0:6A447267-AA42-4AAB-B441-95E1A73315A9',
        'LOGNAME=s2jha',
        'NVM_BIN=/Users/s2jha/.nvm/versions/node/v6.11.0/bin',
        'SECURITYSESSIONID=186a9',
        'COLORTERM=truecolor' ] },
  envPairs:
   [ 'TERM_PROGRAM=iTerm.app',
     'NVM_CD_FLAGS=',
     'SHELL=/bin/bash',
     'TERM=xterm-256color',
     'TMPDIR=/var/folders/72/wk6dblfd125dq4c3ssz8c68rwbk8sn/T/',
     'Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.2nNtidK0Tx/Render',
     'TERM_PROGRAM_VERSION=3.1.3',
     'TERM_SESSION_ID=w0t0p0:6A447267-AA42-4AAB-B441-95E1A73315A9',
     'USER=s2jha',
     'NVM_DIR=/Users/s2jha/.nvm',
     'http_proxy=http://gec-proxy-svr.homeoffice.wal-mart.com:8080/',
     'COMMAND_MODE=unix2003',
     'SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.Ko1A8eqyj5/Listeners',
     '__CF_USER_TEXT_ENCODING=0x38B92335:0x0:0x0',
     'PATH=/Users/s2jha/.nvm/versions/node/v6.11.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/bin:/usr/local/apache-maven/apache-maven-3.3.9/bin',
     '_=/Users/s2jha/.ern/versions/0.8.0/node_modules/.bin/react-native',
     'PWD=/Users/s2jha/Documents/workspaces/ern',
     'JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home',
     'LANG=en_US.UTF-8',
     'ITERM_PROFILE=Default',
     'XPC_FLAGS=0x0',
     'https_proxy=http://gec-proxy-svr.homeoffice.wal-mart.com:8080/',
     'XPC_SERVICE_NAME=0',
     'COLORFGBG=7;0',
     'HOME=/Users/s2jha',
     'SHLVL=2',
     'M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9',
     'ITERM_SESSION_ID=w0t0p0:6A447267-AA42-4AAB-B441-95E1A73315A9',
     'LOGNAME=s2jha',
     'NVM_BIN=/Users/s2jha/.nvm/versions/node/v6.11.0/bin',
     'SECURITYSESSIONID=186a9',
     'COLORTERM=truecolor' ],
  stderr: null,
  stdout: null,
  pid: 5452,
  output: [ null, null, null ],
  signal: null,
  status: 1 }
Command `npm install --save --save-exact react-native@0.49.3` failed.

Command failed: /Users/s2jha/.ern/versions/0.8.0/node_modules/.bin/react-native init MovieListMiniApp --version react-native@0.49.3 --skip-jest
npm ERR! code ETARGET
npm ERR! notarget No matching version found for react-native@0.49.3
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/s2jha/.npm/_logs/2017-10-11T10_39_32_704Z-debug.log
{ Error: Command failed: npm install --save --save-exact react-native@0.49.3
    at checkExecSyncError (child_process.js:481:13)
    at execSync (child_process.js:521:13)
    at run (/Users/s2jha/.ern/versions/0.8.0/node_modules/react-native-cli/index.js:294:5)
    at createProject (/Users/s2jha/.ern/versions/0.8.0/node_modules/react-native-cli/index.js:249:3)
    at init (/Users/s2jha/.ern/versions/0.8.0/node_modules/react-native-cli/index.js:200:5)
    at Object.<anonymous> (/Users/s2jha/.ern/versions/0.8.0/node_modules/react-native-cli/index.js:153:7)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
  error: null,
  cmd: 'npm install --save --save-exact react-native@0.49.3',
  file: '/bin/sh',
  args:
   [ '/bin/sh',
     '-c',
     'npm install --save --save-exact react-native@0.49.3' ],
  options:
   { stdio: [ [Object], [Object], [Object] ],
     shell: true,
     file: '/bin/sh',
     args:
      [ '/bin/sh',
        '-c',
        'npm install --save --save-exact react-native@0.49.3' ],
     envPairs:
      [ 'TERM_PROGRAM=iTerm.app',
        'NVM_CD_FLAGS=',
        'SHELL=/bin/bash',
        'TERM=xterm-256color',
        'TMPDIR=/var/folders/72/wk6dblfd125dq4c3ssz8c68rwbk8sn/T/',
        'Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.2nNtidK0Tx/Render',
        'TERM_PROGRAM_VERSION=3.1.3',
        'TERM_SESSION_ID=w0t0p0:6A447267-AA42-4AAB-B441-95E1A73315A9',
        'USER=s2jha',
        'NVM_DIR=/Users/s2jha/.nvm',
        'http_proxy=http://gec-proxy-svr.homeoffice.wal-mart.com:8080/',
        'COMMAND_MODE=unix2003',
        'SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.Ko1A8eqyj5/Listeners',
        '__CF_USER_TEXT_ENCODING=0x38B92335:0x0:0x0',
        'PATH=/Users/s2jha/.nvm/versions/node/v6.11.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/bin:/usr/local/apache-maven/apache-maven-3.3.9/bin',
        '_=/Users/s2jha/.ern/versions/0.8.0/node_modules/.bin/react-native',
        'PWD=/Users/s2jha/Documents/workspaces/ern',
        'JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home',
        'LANG=en_US.UTF-8',
        'ITERM_PROFILE=Default',
        'XPC_FLAGS=0x0',
        'https_proxy=http://gec-proxy-svr.homeoffice.wal-mart.com:8080/',
        'XPC_SERVICE_NAME=0',
        'COLORFGBG=7;0',
        'HOME=/Users/s2jha',
        'SHLVL=2',
        'M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9',
        'ITERM_SESSION_ID=w0t0p0:6A447267-AA42-4AAB-B441-95E1A73315A9',
        'LOGNAME=s2jha',
        'NVM_BIN=/Users/s2jha/.nvm/versions/node/v6.11.0/bin',
        'SECURITYSESSIONID=186a9',
        'COLORTERM=truecolor' ] },
  envPairs:
   [ 'TERM_PROGRAM=iTerm.app',
     'NVM_CD_FLAGS=',
     'SHELL=/bin/bash',
     'TERM=xterm-256color',
     'TMPDIR=/var/folders/72/wk6dblfd125dq4c3ssz8c68rwbk8sn/T/',
     'Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.2nNtidK0Tx/Render',
     'TERM_PROGRAM_VERSION=3.1.3',
     'TERM_SESSION_ID=w0t0p0:6A447267-AA42-4AAB-B441-95E1A73315A9',
     'USER=s2jha',
     'NVM_DIR=/Users/s2jha/.nvm',
     'http_proxy=http://gec-proxy-svr.homeoffice.wal-mart.com:8080/',
     'COMMAND_MODE=unix2003',
     'SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.Ko1A8eqyj5/Listeners',
     '__CF_USER_TEXT_ENCODING=0x38B92335:0x0:0x0',
     'PATH=/Users/s2jha/.nvm/versions/node/v6.11.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/bin:/usr/local/apache-maven/apache-maven-3.3.9/bin',
     '_=/Users/s2jha/.ern/versions/0.8.0/node_modules/.bin/react-native',
     'PWD=/Users/s2jha/Documents/workspaces/ern',
     'JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home',
     'LANG=en_US.UTF-8',
     'ITERM_PROFILE=Default',
     'XPC_FLAGS=0x0',
     'https_proxy=http://gec-proxy-svr.homeoffice.wal-mart.com:8080/',
     'XPC_SERVICE_NAME=0',
     'COLORFGBG=7;0',
     'HOME=/Users/s2jha',
     'SHLVL=2',
     'M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9',
     'ITERM_SESSION_ID=w0t0p0:6A447267-AA42-4AAB-B441-95E1A73315A9',
     'LOGNAME=s2jha',
     'NVM_BIN=/Users/s2jha/.nvm/versions/node/v6.11.0/bin',
     'SECURITYSESSIONID=186a9',
     'COLORTERM=truecolor' ],
  stderr: null,
  stdout: null,
  pid: 5452,
  output: [ null, null, null ],
  signal: null,
  status: 1 }
Command `npm install --save --save-exact react-native@0.49.3` failed.
sachinjha1 commented 7 years ago

It seems the issue is only with claudron v0.8.0. I was able to create miniApp using claudron v0.7.0. v0.7.0 is using react-native 0.48.3.

belemaire commented 7 years ago

@sachinjha1 react-native 0.49.3 has been published by Facebook 2 days ago. You can see that its the latest by looking at public NPM here : https://www.npmjs.com/package/react-native That being said, when switching over to internal Walmart NPM repository (private npm) I can see that the latest version available is 0.49.2. So the problem only happens if you are using Walmart internal NPM. I'm trying to contact the team in charge of our internal NPM repository to get more details about how propagation works. We've published some packages to NPM public and were able to see them correctly propagated to our internal NPM in a matter of minutes. So I'm not sure why it takes so long for react-native new version to be propagated to Walmart NPM. Will ping back once I have more info.

belemaire commented 7 years ago

@sachinjha1 react-native@0.49.3 is now available in the Walmart NPM repository. Looks like it was some kind of propagation issue. Will keep an eye on this next time we upgrade react-native. Thanks for reporting this issue !