не понимаю файл bebug.log для запуска npm запуска в реактивном проекте - PullRequest
1 голос
/ 08 апреля 2020

Может кто-нибудь помочь мне объяснить, как читать этот файл debug.log? Я пытаюсь запустить npm start для реактивного проекта. Я попытался установить npm снова с помощью npm install, npm исправления аудита, затем также запускаются реакции-скрипты, и ничего из того, что я пробовал, не работает.

Вот код ниже.

```
info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@6.10.2
3 info using node@v12.9.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle website@0.1.0~prestart: website@0.1.0
6 info lifecycle website@0.1.0~start: website@0.1.0
7 verbose lifecycle website@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle website@0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/inhyechoi/Desktop/InhyeChoi/react/inhyechoi-portfolio/inhyechoi.github.io/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin
9 verbose lifecycle website@0.1.0~start: CWD: /Users/inhyechoi/Desktop/InhyeChoi/react/inhyechoi-portfolio/inhyechoi.github.io
10 silly lifecycle website@0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle website@0.1.0~start: Returned: code: 1  signal: null
12 info lifecycle website@0.1.0~start: Failed to exec start script
13 verbose stack Error: website@0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:326:16)
13 verbose stack     at EventEmitter.emit (events.js:209:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:209:13)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid website@0.1.0
15 verbose cwd /Users/inhyechoi/Desktop/InhyeChoi/react/inhyechoi-portfolio/inhyechoi.github.io
16 verbose Darwin 19.4.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v12.9.0
19 verbose npm  v6.10.2
20 error code ELIFECYCLE
21 error errno 1
22 error website@0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the website@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
```

1 Ответ

0 голосов
/ 09 апреля 2020

Я попытался установить пряжу, чтобы посмотреть, работает ли она

brew install yarn

И я заметил, что оба индекса. html / index. js файл не в том месте. Поэтому я положил их в нужную папку, и это сработало!

Итак, я удалил пряжу с помощью brew uninstall yarn

и теперь использую npm start

для запуска проекта.

...