1

After upgrading the RN to 0.62.2 then it failed and then shows the above evaluating 'process.version.split'.

TypeError: undefined is not an object (evaluating 'process.version.split')

The issue is with the rn-nodeify

enter image description here

{
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "test:debug": "node --inspect node_modules/.bin/jest --runInBand",
    "postinstall": "sh fix-amplify-jank.sh && ./node_modules/.bin/rn-nodeify --install --hack --yarn"
  },
  "dependencies": {
    "url": "^0.10.3",
    "util": "^0.10.4",
    "vm-browserify": "0.0.4"
  },
11
  • enter this on terminal export version=0.0.1 and start metro bundler again Commented Jun 9, 2020 at 5:29
  • did you know on which file error is coming from? Commented Jun 9, 2020 at 12:06
  • No, my understanding is it is coming from rn-nodeify Commented Jun 9, 2020 at 12:09
  • yes you are right. can you try this in root App.js process.env.version="0.0.1" Commented Jun 9, 2020 at 12:21
  • can you add package.json in question? Commented Jun 9, 2020 at 12:22

1 Answer 1

2

In my case, I just added

/*<replacement>*/
var process = require("process");   // THIS LINE
var pna = require('process-nextick-args');
/*</replacement>*/

in node_modules\readable-stream\lib\ _stream_writable.js

Sign up to request clarification or add additional context in comments.

7 Comments

looks like it worked for me after installing a few libraries
@ichimaru, you can search for this lines in the whole project and check which of the process variable has not been assigned with a value
Where in the file did you add this? and did you add those 4 lines, or just the line that says "// THIS LINE"...? i've searching for parts of that 4 lines and nothing was found so assume you add all 4 lines, but where about in the file?
This is an old thread and I am not sure if this issue is still existing. Yes only the line says "// THIS LINE"
I am having the issue right now, so it certainly exists in some form or shape. I am building a react native project using multiple modules including crypto (if this helps at all)
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.