0

I'm at a loss at the moment. Just as a hobby I'm following a Udemy video guide on creating apps with react-native. My instructor casually runs the command npm run eject and everything works for him without an error. At the end of the line I receive the (as I found out) well known error

The batch file cannot be found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! testapp2@0.1.0 eject: `react-native-scripts eject`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the testapp2@0.1.0 eject script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Mark\AppData\Roaming\npm-cache\_logs\2018-06-24T13_14_00_139Z-debug.log

Windows OS: W10 x64 Node version: v8.11.3 NPM version: 5.7.1 yarn version: 1.7.0

I read on a few pages that the changed files should be commited to git or something like that. However since my instructor didn't do this I figured he didnt have git installed, so I removed that from my computer.

This error message isn't only displayed when I eject my "study" app, also when I just create an app and eject it inmediatly the error is generated.

Creating a new app;

C:\Users\Mark>create-react-native-app testapp2
Creating a new React Native app in C:\Users\Mark\testapp2.

Using package manager as yarnpkg with yarn interface.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...

yarn add v1.7.0
info No lockfile found.
[1/4] Resolving packages...
warning react-native-scripts > xdl > auth0 > rest-facade > superagent-proxy > proxy-agent > socks-proxy-agent > socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
[2/4] Fetching packages...
info @expo/ngrok-bin-darwin-ia32@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-darwin-ia32@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-darwin-ia32@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-freebsd-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-freebsd-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-sunos-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-sunos-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-win32-ia32@2.2.8-beta.1: The CPU architecture "x64" is incompatible with this module.
info "@expo/ngrok-bin-win32-ia32@2.2.8-beta.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-freebsd-ia32@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-freebsd-ia32@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-freebsd-ia32@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-linux-ia32@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-ia32@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-ia32@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-linux-arm64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-arm64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-arm64@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-linux-arm@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-arm@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-arm@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-darwin-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-darwin-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 323 new dependencies.
info Direct dependencies
+- react-native-scripts@1.14.0
info All dependencies
+- @expo/bunyan@1.8.10
+- @expo/json-file@5.3.0
+- @expo/ngrok-bin-win32-x64@2.2.8-beta.1
+- @expo/ngrok-bin@2.2.8-beta.3
+- @expo/ngrok@2.4.2
+- @expo/osascript@1.8.1
+- @expo/schemer@1.1.0
+- @segment/loosely-validate-event@1.1.2
+- @types/events@1.2.0
+- @types/glob@5.0.35
+- @types/minimatch@3.0.3
+- @types/node@10.3.5
+- accepts@1.3.5
+- ajv@5.5.2
+- analytics-node@2.4.1
+- ansi-regex@3.0.0
+- ansi-styles@3.2.1
+- array-flatten@1.1.1
+- array-union@1.0.2
+- array-uniq@1.0.3
+- asap@2.0.6
+- asn1@0.2.3
+- ast-types@0.11.5
+- async@0.9.2
+- asynckit@0.4.0
+- auth0-js@9.3.3
+- auth0@2.9.1
+- aws-sign2@0.7.0
+- aws4@1.7.0
+- axios@0.16.2
+- babel-plugin-syntax-flow@6.18.0
+- babel-plugin-transform-flow-strip-types@6.22.0
+- babel-polyfill@6.26.0
+- babel-preset-flow@6.23.0
+- babel-runtime@6.26.0
+- balanced-match@1.0.0
+- bcrypt-pbkdf@1.0.1
+- body-parser@1.18.3
+- brace-expansion@1.1.11
+- buffer-equal-constant-time@1.0.1
+- buffer-from@1.1.0
+- callsite@1.0.0
+- capture-stack-trace@1.0.0
+- caseless@0.12.0
+- change-case@2.3.1
+- chardet@0.4.2
+- charenc@0.0.2
+- chownr@1.0.1
+- clone@2.1.1
+- color-convert@1.9.2
+- color-name@1.1.1
+- combined-stream@1.0.6
+- commander@2.15.1
+- component-emitter@1.2.1
+- component-type@1.2.1
+- concat-map@0.0.1
+- concat-stream@1.6.2
+- constant-case@1.1.2
+- content-disposition@0.5.2
+- cookie-signature@1.0.6
+- cookiejar@2.1.2
+- core-js@2.5.7
+- create-error-class@3.0.2
+- cross-spawn@5.1.0
+- crypt@0.0.2
+- crypto-js@3.1.9-1
+- crypto-token@1.0.1
+- dashdash@1.14.1
+- data-uri-to-buffer@1.2.0
+- decache@4.4.0
+- deep-diff@0.3.4
+- deep-is@0.1.3
+- deepmerge@1.5.2
+- degenerator@1.0.4
+- delay-async@1.1.0
+- delayed-stream@1.0.0
+- destroy@1.0.4
+- dot-case@1.1.2
+- duplexer3@0.1.4
+- ecc-jsbn@0.1.1
+- ecdsa-sig-formatter@1.0.10
+- ee-first@1.1.1
+- encoding@0.1.12
+- es-abstract@1.12.0
+- es-to-primitive@1.1.1
+- es6-promise@4.2.4
+- es6-promisify@5.0.0
+- escodegen@1.10.0
+- esprima@3.1.3
+- estraverse@4.2.0
+- esutils@2.0.2
+- exec-async@2.2.0
+- exists-async@2.0.0
+- express@4.16.3
+- extend@3.0.1
+- external-editor@2.2.0
+- extsprintf@1.3.0
+- fast-deep-equal@1.1.0
+- fast-json-stable-stringify@2.0.0
+- fast-levenshtein@2.0.6
+- fbjs@0.8.17
+- file-type@4.4.0
+- file-uri-to-path@1.0.0
+- finalhandler@1.1.1
+- foreach@2.0.5
+- forever-agent@0.6.1
+- form-data@2.3.2
+- formidable@1.2.1
+- forwarded@0.1.2
+- freeport-async@1.1.1
+- fs-extra@3.0.1
+- fs-minipass@1.2.5
+- fs.realpath@1.0.0
+- ftp@0.3.10
+- get-stream@3.0.0
+- get-uri@2.0.2
+- getenv@0.7.0
+- getpass@0.1.7
+- glob-promise@3.4.0
+- globby@6.1.0
+- got@6.7.1
+- har-schema@2.0.0
+- har-validator@5.0.3
+- has-flag@3.0.0
+- has-symbols@1.0.0
+- hasbin@1.2.3
+- hoist-non-react-statics@2.5.5
+- home-dir@1.0.0
+- http-signature@1.2.0
+- iconv-lite@0.4.23
+- idtoken-verifier@1.2.0
+- idx@2.4.0
+- indent-string@3.2.0
+- inflight@1.0.6
+- inherits@2.0.3
+- inquirer@3.3.0
+- instapromise@2.0.7
+- invariant@2.2.4
+- ip@1.1.5
+- ipaddr.js@1.6.0
+- is-buffer@1.1.6
+- is-callable@1.1.3
+- is-date-object@1.0.1
+- is-fullwidth-code-point@2.0.0
+- is-lower-case@1.1.3
+- is-promise@2.1.0
+- is-redirect@1.0.0
+- is-regex@1.0.4
+- is-retry-allowed@1.1.0
+- is-stream@1.1.0
+- is-symbol@1.0.1
+- is-typedarray@1.0.0
+- is-upper-case@1.1.2
+- isarray@1.0.0
+- isemail@2.2.1
+- isexe@2.0.0
+- isomorphic-fetch@2.2.1
+- isstream@0.1.2
+- items@2.1.1
+- joi@10.6.0
+- join-component@1.1.0
+- js-tokens@3.0.2
+- json-schema-traverse@0.3.1
+- json-schema@0.2.3
+- json-stringify-safe@5.0.1
+- json5@0.5.1
+- jsonfile@2.4.0
+- jsonschema@1.2.4
+- jsonwebtoken@7.4.3
+- jsprim@1.4.1
+- jwa@1.1.6
+- jws@3.1.5
+- levn@0.3.0
+- lock@0.1.4
+- lodash-es@4.17.10
+- lodash.once@4.1.1
+- lodash@4.17.10
+- logfmt@1.2.1
+- lower-case-first@1.0.2
+- lowercase-keys@1.0.1
+- lru-cache@4.1.3
+- lru-memoizer@1.12.0
+- match-require@2.1.0
+- md5@2.2.1
+- md5hex@1.0.0
+- media-typer@0.3.0
+- merge-descriptors@1.0.1
+- methods@1.1.2
+- mime-db@1.33.0
+- mime@1.4.1
+- mimic-fn@1.2.0
+- minimatch@3.0.4
+- minimist@1.2.0
+- minizlib@1.1.0
+- mkdirp-promise@5.0.1
+- mkdirp@0.5.1
+- moment@2.22.2
+- mv@2.1.1
+- ncp@2.0.0
+- negotiator@0.6.1
+- netmask@1.0.6
+- next-tick@1.0.0
+- node-fetch@1.7.3
+- oauth-sign@0.8.2
+- object-assign@4.1.1
+- object-keys@1.0.12
+- object.assign@4.1.0
+- object.getownpropertydescriptors@2.0.3
+- onetime@2.0.1
+- opn@4.0.2
+- optionator@0.8.2
+- os-tmpdir@1.0.2
+- pac-proxy-agent@2.0.2
+- pac-resolver@3.0.0
+- param-case@1.1.2
+- pascal-case@1.1.2
+- path-case@1.1.2
+- path-exists@3.0.0
+- path-is-absolute@1.0.1
+- path-to-regexp@0.1.7
+- performance-now@2.1.0
+- pify@2.3.0
+- pinkie@2.0.4
+- plist@2.1.0
+- prepend-http@1.0.4
+- probe-image-size@3.2.0
+- process-nextick-args@2.0.0
+- progress@2.0.0
+- promise@7.3.1
+- proxy-addr@2.0.3
+- proxy-agent@2.3.1
+- proxy-from-env@1.0.0
+- pseudomap@1.0.2
+- psl@1.1.28
+- qrcode-terminal@0.11.0
+- qs@6.5.2
+- querystring@0.2.0
+- raven-js@3.26.3
+- raven@2.6.3
+- raw-body@2.3.3
+- react-native-scripts@1.14.0
+- react-redux@5.0.7
+- react@16.4.1
+- readable-stream@2.3.6
+- redux-logger@2.10.2
+- redux@3.7.2
+- regenerator-runtime@0.11.1
+- remove-trailing-slash@0.1.0
+- replace-string@1.1.0
+- request-progress@3.0.0
+- request-promise-core@1.1.1
+- request-promise-native@1.0.5
+- request@2.87.0
+- rest-facade@1.10.1
+- restore-cursor@2.0.0
+- retry@0.10.1
+- rimraf@2.6.2
+- rx-lite-aggregates@4.0.8
+- rx-lite@4.0.8
+- rxjs@5.5.11
+- safe-json-stringify@1.2.0
+- safer-buffer@2.1.2
+- semver@5.5.0
+- serve-static@1.13.2
+- setimmediate@1.0.5
+- shebang-command@1.2.0
+- shebang-regex@1.0.0
+- signal-exit@3.0.2
+- slugid@1.1.0
+- slugify@1.3.0
+- smart-buffer@1.1.15
+- socks@1.1.10
+- source-map-support@0.4.18
+- source-map@0.5.7
+- split@1.0.1
+- sshpk@1.14.2
+- stack-trace@0.0.10
+- stealthy-require@1.1.1
+- stream-parser@0.3.1
+- string_decoder@1.1.1
+- superagent-proxy@1.0.3
+- superagent-retry@0.6.0
+- supports-color@5.4.0
+- swap-case@1.1.2
+- symbol-observable@1.2.0
+- tar@4.4.4
+- thenify-all@1.6.0
+- thenify@3.3.0
+- throttleit@1.0.0
+- thunkify@2.1.2
+- timed-out@4.0.1
+- title-case@1.1.2
+- tmp@0.0.33
+- topo@2.0.2
+- tough-cookie@2.4.2
+- tree-kill@1.2.0
+- tunnel-agent@0.6.0
+- tweetnacl@0.14.5
+- type-is@1.6.16
+- typedarray@0.0.6
+- ua-parser-js@0.7.18
+- unpipe@1.0.0
+- unzip-response@2.0.1
+- url-parse-lax@1.0.0
+- url@0.11.0
+- util-deprecate@1.0.2
+- util.promisify@1.0.0
+- utils-merge@1.0.1
+- uuid@3.2.1
+- vary@1.1.2
+- verror@1.10.0
+- very-fast-args@1.1.0
+- whatwg-fetch@2.0.4
+- which@1.3.1
+- winchan@0.2.0
+- wordwrap@1.0.0
+- xdl@48.1.4
+- xmlbuilder@8.2.2
+- xmldom@0.1.27
+- xregexp@2.0.0
+- xtend@4.0.1
+- yallist@2.1.2
+- yesno@0.0.1
Done in 202.45s.
Installing dependencies using yarn...

yarn install v1.7.0
[1/4] Resolving packages...
warning jest-expo > jest > jest-cli > istanbul-api > istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-darwin-ia32@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-darwin-ia32@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-darwin-ia32@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-darwin-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-darwin-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-freebsd-ia32@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-freebsd-ia32@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-freebsd-ia32@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-freebsd-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-freebsd-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-arm@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-arm@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-arm@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-linux-arm64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-arm64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-arm64@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-linux-ia32@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-ia32@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-ia32@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-linux-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-sunos-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-sunos-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-win32-ia32@2.2.8-beta.1: The CPU architecture "x64" is incompatible with this module.
info "@expo/ngrok-bin-win32-ia32@2.2.8-beta.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "expo > react-native-maps@0.21.0" has incorrect peer dependency "react-native@^0.51 || ^0.52 || ^0.53 || ^0.54".warning "expo > react-native-web-maps@0.1.0" has unmet peer dependency "react-native-web@*".
warning "expo > react-native-web-maps > react-google-maps@7.3.0" has incorrect peer dependency "react@15.5.4".
warning "expo > react-native-web-maps > react-google-maps@7.3.0" has unmet peer dependency "react-dom@15.5.4".
warning "expo > react-native-web-maps > react-google-maps > react-prop-types-element-of-type@2.2.0" has incorrect peer dependency "react@^0.14.6 || ^15.0.0-0".
warning "react-native > eslint-plugin-react-native@3.2.1" has unmet peer dependency "eslint@^3.17.0 || ^4.0.0".
warning "jest-expo > babel-jest@22.4.4" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 304.73s.

Success! Created testapp2 at C:\Users\Mark\testapp2
Inside that directory, you can run several commands:

  yarn start
    Starts the development server so you can open your app in the Expo
    app on your phone.

  yarn run ios
    (Mac only, requires Xcode)
    Starts the development server and loads your app in an iOS simulator.

  yarn run android
    (Requires Android build tools)
    Starts the development server and loads your app on a connected Android
    device or emulator.


  yarn test
    Starts the test runner.

  yarn run eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!


We suggest that you begin by typing:

  cd testapp2
  yarn start

Happy hacking!

Ejecting the app

C:\Users\Mark\testapp2>npm run eject

> testapp2@0.1.0 eject C:\Users\Mark\testapp2
> react-native-scripts eject


We didn't find any uses of the Expo SDK in your project, so you should be fine to eject to
"Plain" React Native. (This check isn't very sophisticated, though.)

We strongly recommend that you read this document before you proceed:
  https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md

Ejecting is permanent! Please be careful with your selection.

? How would you like to eject from create-react-native-app? React Native: I'd like a regular React Native project.
We have a couple of questions to ask you about how you'd like to name your app:
? What should your app appear as on a user's home screen? testpp
? What should your Android Studio and Xcode projects be called? testapp
Writing your selections to app.json...
Wrote to app.json, please update it manually in the future.
Scanning folders for symlinks in C:\Users\Mark\testapp2\node_modules (63ms)
Generating the iOS folder.
Generating the Android folder.
Successfully copied template native code.
Babel preset changed to `babel-preset-react-native-stage-0/decorator-support`.
Updating your yarn scripts in package.json...
Your package.json is up to date!
Adding entry point...
Added new entry points!

Note that using `yarn start` will now require you to run Xcode and/or
Android Studio to build the native code for your project.
Removing node_modules...
Installing packages with yarn...
yarn add v1.7.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-native > eslint-plugin-react-native@3.2.1" has unmet peer dependency "eslint@^3.17.0 || ^4.0.0".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 25 new dependencies.
info Direct dependencies
+- babel-preset-react-native-stage-0@1.0.1
+- jest-react-native@18.0.0
+- jest@23.1.0
info All dependencies
+- babel-jest@23.0.1
+- babel-plugin-jest-hoist@23.0.1
+- babel-plugin-syntax-class-constructor-call@6.18.0
+- babel-plugin-syntax-do-expressions@6.13.0
+- babel-plugin-syntax-function-bind@6.13.0
+- babel-plugin-transform-class-constructor-call@6.24.1
+- babel-plugin-transform-do-expressions@6.22.0
+- babel-plugin-transform-export-extensions@6.22.0
+- babel-plugin-transform-function-bind@6.22.0
+- babel-preset-jest@23.0.1
+- babel-preset-react-native-stage-0@1.0.1
+- babel-preset-react-native@1.9.2
+- expect@23.1.0
+- istanbul-api@1.3.1
+- jest-changed-files@23.0.1
+- jest-cli@23.1.0
+- jest-each@23.1.0
+- jest-environment-node@23.1.0
+- jest-leak-detector@23.0.1
+- jest-react-native@18.0.0
+- jest-resolve-dependencies@23.0.1
+- jest-runner@23.1.0
+- jest-watcher@23.1.0
+- jest@23.1.0
+- yargs-parser@9.0.2
Done in 79.68s.
Ejected successfully!
Please consider letting us know why you ejected in this survey:
The batch file cannot be found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! testapp2@0.1.0 eject: `react-native-scripts eject`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the testapp2@0.1.0 eject script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Mark\AppData\Roaming\npm-cache\_logs\2018-06-24T13_14_00_139Z-debug.log

As I am still new to this and do not know yet how to proceed properly; 1) How is this error still generated if I do not have git installed? 2) Do I still need to commit changes? If so how do I do this correctly? 3) The warning messages shown while creating the app with Yarn installed can these be safely ignored? If Yarn isn't installed it isn't showing this many warning messages etc.

Thanks in advance!

MarkT
  • 97
  • 1
  • 11

2 Answers2

0

This happens due to the way node was installed and the current version. Please follow this solution in order to fix this issues

galvan
  • 7,400
  • 7
  • 38
  • 55
  • I actually allready installed Node again this morning but the fault didn't go away (allready installed Yarn again also) However I didn't check if alle the node folders and files where deleted. I will start deleting everything again and try from scratch. – MarkT Jun 24 '18 at 20:30
  • 1
    Unfortunatly the reïnstall didn't help in my case. I uninstalled the installed version and removed every reference to Node/NPM on the system and userprofile. After this I downloaded the latest LTS version from the site and installed it. After install I ran install -g create-react-native-app and npm i npm@latest -g However after creating and ejecting the app I still receive the same error messages like before the reinstall. – MarkT Jun 25 '18 at 05:58
0

Update your npm:

npm install -g npm

Please note that this command will remove your current version of npm. Make sure to use sudo npm install -g npm if on a Mac.

Worked for me as I had the same issue following a lecture on Udemy

biruk1230
  • 3,042
  • 4
  • 16
  • 29
LekT
  • 1
  • 1