Getting error: Cannot find module "./src/init" when trying to initialize native response application

When I try to set the native response using the command react-native init ProjectName

I get the following:

This will walk you through creating a new React Native project in C:\Users\Xegano\Documents\ProjectName
Installing react-native package from npm...
Setting up new React Native app in C:\Users\Xegano\Documents\ProjectName
module.js:457
    throw err;
    ^

Error: Cannot find module './src/init'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\Xegano\Documents\ProjectName\node_modules\gulp-sourcemaps\index.js:4:9)
    at Module._compile (module.js:556:32)
    at Module._extensions..js (module.js:565:10)
    at Object.require.extensions.(anonymous function) [as .js] (C:\Users\Xegano\Documents\ProjectName\node_modules\babel-register\lib\node.js:152:7)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)

Why is this happening? It used to work before, the only thing I remember, I changed are some packages from the SDK Manager. Maybe so?

+4
source share
3 answers

gulp -sourcemaps 2.1.0, . GitHub: https://github.com/floridoo/gulp-sourcemaps/issues/238. , , 2.0.x 1.7.x.

: GitHub :

$ mkdir MyProject
$ cd MyProject
$ npm i gulp-sourcemaps@1.7
$ cd ..
$ react-native init MyProject # answer yes
+3

, gulp -sourcemaps 1.7

$ cd MyProject
$ rm -rf node_modules/gulp-sourcemaps
$ npm install gulp-sourcemaps@1.7
$ cd ..
$ react-native init MyProject
+4

Source: https://habr.com/ru/post/1657672/


All Articles