Проект React Native не запускается из-за ошибки: EISDIR

#node.js #react-native #npm

#node.js #react-native #npm

Вопрос:

Начинающий пользователь react native здесь.

Я попытался следовать руководству Mosh по React Native, но когда я запускаю команду запуска npm, я получаю эту ошибку в терминале:

 Opening DevTools in the browser... (press shift-d to disable)
error EISDIR: illegal operation on a directory, read.

Error: EISDIR: illegal operation on a directory, read
Metro Bundler process exited with code 1
Error: Metro Bundler process exited with code 1
    at ChildProcess.<anonymous> (C:@expoxdl@57.9.35srcProject.ts:1917:16)
    at Object.onceWrapper (events.js:422:26)
    at ChildProcess.emit (events.js:315:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start 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:UserssteveAppDataRoamingnpm-cache_logs2020-09-04T16_22_24_340Z-debug.log
  

Вот подробный журнал:

 0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\Program Files\nodejs\node.exe',
1 verbose cli   'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'web'
1 verbose cli ]
2 info using npm@6.14.6
3 info using node@v12.18.3
4 verbose run-script [ 'preweb', 'web', 'postweb' ]
5 info lifecycle @~preweb: @
6 info lifecycle @~web: @
7 verbose lifecycle @~web: unsafe-perm in lifecycle true
8 verbose lifecycle @~web: PATH: C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;C:UserssteveMyAppnode_modules.bin;C:Python38Scripts;C:Python38;C:Program Files (x86)Common FilesOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Program FilesNVIDIA CorporationNVIDIA NvDLISR;C:Program FilesGitcmd;C:Program Files (x86)Bracketscommand;C:Program Filesdotnet;C:Program Filesnodejs;C:ProgramDatachocolateybin;C:UserssteveAppDataLocalMicrosoftWindowsApps;;C:UserssteveAppDataLocalProgramsMicrosoft VS Codebin;C:Userssteve.dotnettools;C:UserssteveAppDataRoamingnpm
9 verbose lifecycle @~web: CWD: C:UserssteveMyApp
10 silly lifecycle @~web: Args: [ '/d /s /c', 'expo start --web' ]
11 silly lifecycle @~web: Returned: code: 1  signal: null
12 info lifecycle @~web: Failed to exec web script
13 verbose stack Error: @ web: `expo start --web`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid @
15 verbose cwd C:UserssteveMyApp
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "web"
18 verbose node v12.18.3
19 verbose npm  v6.14.6
20 error code ELIFECYCLE
21 error errno 1
22 error @ web: `expo start --web`
22 error Exit status 1
23 error Failed at the @ web script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
  

версия npm: 6.14.6
версия узла: 12.18.3
версия expo: 3.26.2

Команды, которые я запускал:

npm i -g expo-cli

expo инициализирует MyApp

* выбран пустой управляемый рабочий процесс

cd MyApp

запуск npm

Любая помощь будет высоко оценена.