Как устранить ошибку ELIFECYCLE при запуске React vr на node.js на экземпляре amazon ec2 с Windows Server 2019 - PullRequest
0 голосов
/ 08 мая 2020

Я пытаюсь реализовать свой VR-проект с node js с помощью React VR. Я делаю это в экземпляре Amazon ec2 Windows server 2019. У меня npm версия 6.14.4 и интерфейс командной строки React VR 0.3.6. В командной строке node js я установил React VR, используя следующую команду:

npm install -g react-vr-cli

Затем я создал каталог на рабочем столе, открыл его и выполнил следующую команду для создания своего проекта:

react-vr init firstproject

('firstproject' - это имя проекта, который я хочу создать) На экране появились следующие операции:

Creating new React VR project...
Project directory created at firstproject

Copying assets...

Installing dependencies...
npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated

> core-js@2.6.11 postinstall C:\Users\Administrator\Desktop\virtualone\firstproject\node_modules\babel-polyfill\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> core-js@2.6.11 postinstall C:\Users\Administrator\Desktop\virtualone\firstproject\node_modules\babel-register\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@2.6.11 postinstall C:\Users\Administrator\Desktop\virtualone\firstproject\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@2.6.11 postinstall C:\Users\Administrator\Desktop\virtualone\firstproject\node_modules\metro-bundler\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@2.6.11 postinstall C:\Users\Administrator\Desktop\virtualone\firstproject\node_modules\react-native\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> electron@1.8.8 postinstall C:\Users\Administrator\Desktop\virtualone\firstproject\node_modules\electron
> node install.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.3 (node_modules\jest-haste-map\node_modules\sane\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN react-native@0.48.4 requires a peer of react@16.0.0-alpha.12 but none is installed. You must install peer dependencies yourself.

added 997 packages from 585 contributors and audited 19548 packages in 71.921s

3 packages are looking for funding
  run `npm fund` for details

found 63 vulnerabilities (49 low, 2 moderate, 12 high)
  run `npm audit fix` to fix them, or `npm audit` for details
Done!
  Now enter the new project directory by running `cd firstproject`
  Run `npm start` to initialize the development server
  From there, browse to http://localhost:8081/vr/
  Open `index.vr.js` to begin editing your app.

Попав в каталог проекта, я запустил

npm start

Я получил следующее сообщение:

 firstproject@0.0.1 start C:\Users\Administrator\Desktop\virtualone\firstproject
> node -e "console.log('open browser at http://localhost:8081/vr/\n\n');" && node node_modules/react-native/local-cli/cli.js start

open browser at http://localhost:8081/vr/



Invalid regular expression: /(node_modules[\\\]react[\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__tests__\\.*)$/: Unterminated character class

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! firstproject@0.0.1 start: `node -e "console.log('open browser at http://localhost:8081/vr/\n\n');" && node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the firstproject@0.0.1 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:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-05-08T03_33_59_338Z-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   'start'
1 verbose cli ]
2 info using npm@6.14.4
3 info using node@v12.16.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle firstproject@0.0.1~prestart: firstproject@0.0.1
6 info lifecycle firstproject@0.0.1~start: firstproject@0.0.1
7 verbose lifecycle firstproject@0.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle firstproject@0.0.1~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Administrator\Desktop\virtualone\firstproject\node_modules\.bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\Python38\Scripts\;C:\Python38\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Amazon\cfn-bootstrap\;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Users\Administrator\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\Administrator\AppData\Local\Programs\Python\Python36\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Local\atom\bin;C:\Program Files\JetBrains\PyCharm Community Edition 2020.1\bin;;C:\Program Files\JetBrains\PyCharm 2019.2.1\bin;;C:\Users\Administrator\AppData\Roaming\npm
9 verbose lifecycle firstproject@0.0.1~start: CWD: C:\Users\Administrator\Desktop\virtualone\firstproject
10 silly lifecycle firstproject@0.0.1~start: Args: [
10 silly lifecycle   '/d /s /c',
10 silly lifecycle   `node -e "console.log('open browser at http://localhost:8081/vr/\\n\\n');" && node node_modules/react-native/local-cli/cli.js start`
10 silly lifecycle ]
11 silly lifecycle firstproject@0.0.1~start: Returned: code: 1  signal: null
12 info lifecycle firstproject@0.0.1~start: Failed to exec start script
13 verbose stack Error: firstproject@0.0.1 start: `node -e "console.log('open browser at http://localhost:8081/vr/\n\n');" && node node_modules/react-native/local-cli/cli.js start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:310:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:310: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 firstproject@0.0.1
15 verbose cwd C:\Users\Administrator\Desktop\virtualone\firstproject
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.16.3
19 verbose npm  v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error firstproject@0.0.1 start: `node -e "console.log('open browser at http://localhost:8081/vr/\n\n');" && node node_modules/react-native/local-cli/cli.js start`
22 error Exit status 1
23 error Failed at the firstproject@0.0.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

У кого-нибудь есть идеи, как исправить эту ошибку? Я полный новичок в node js и VR. Пожалуйста, помогите.

...