热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

React项目npm编译错误

react项目无法编译2.npm错误信息:

  1. react项目无法编译

2.

npm错误信息:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$ npm start-fe



Usage: npm



where is one of:

    access, adduser, audit, bin, bugs, c, cache, ci, cit,

    completion, config, create, ddp, dedupe, deprecate,

    dist-tag, docs, doctor, edit, explore, get, help,

    help-search, hook, i, init, install, install-test, it, link,

    list, ln, login, logout, ls, outdated, owner, pack, ping,

    prefix, profile, prune, publish, rb, rebuild, repo, restart,

    root, run, run-script, s, se, search, set, shrinkwrap, star,

    stars, start, stop, t, team, test, token, tst, un,

    uninstall, unpublish, unstar, up, update, v, version, view,

    whoami



npm -h  quick help on

npm -l            display full usage info

npm help   search for help on

npm help npm      involved overview



Specify configs in the ini-formatted file:

    C:\Users\Administrator\.npmrc

or on the command line via: npm --key value

Config info can be viewed via: npm help config



npm@6.4.1 C:\Program Files\nodejs\node_modules\npm



Did you mean one of these?

    start

    stars

    star

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
0 info it worked if it ends with ok

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' ]

2 info using npm@6.4.1

3 info using node@v10.14.2

4 verbose run-script [ 'prestart', 'start', 'poststart' ]

5 info lifecycle client-frontend@0.1.0~prestart: client-frontend@0.1.0

6 info lifecycle client-frontend@0.1.0~start: client-frontend@0.1.0

7 verbose lifecycle client-frontend@0.1.0~start: unsafe-perm in lifecycle true

8 verbose lifecycle client-frontend@0.1.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\demo\stc-triathlon\STCRace_Handover_6e\STCRace_Handover_6e\2 Sourcecodes\STC-Race-Code\STC-Race-Code\client-frontend\node_modules\.bin;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\demo\stc-triathlon\STCRace_Handover_6e\STCRace_Handover_6e\2 Sourcecodes\STC-Race-Code\STC-Race-Code\node_modules\.bin;C:\Users\Administrator\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Administrator\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Python33;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;C:\Program Files (x86)\Microsoft SDKs\TypeScript\0.9;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\Program Files\Git\cmd;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Calibre2;C:\Program Files\nodejs;C:\Program Files\PuTTY;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl

9 verbose lifecycle client-frontend@0.1.0~start: CWD: C:\demo\stc-triathlon\STCRace_Handover_6e\STCRace_Handover_6e\2 Sourcecodes\STC-Race-Code\STC-Race-Code\client-frontend

10 silly lifecycle client-frontend@0.1.0~start: Args: [ '/d /s /c', 'react-app-rewired start' ]

11 silly lifecycle client-frontend@0.1.0~start: Returned: code: 1  signal: null

12 info lifecycle client-frontend@0.1.0~start: Failed to exec start script

13 verbose stack Error: client-frontend@0.1.0 start: `react-app-rewired start`

13 verbose stack Exit status 1

13 verbose stack     at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)

13 verbose stack     at EventEmitter.emit (events.js:182:13)

13 verbose stack     at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)

13 verbose stack     at ChildProcess.emit (events.js:182:13)

13 verbose stack     at maybeClose (internal/child_process.js:962:16)

13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

14 verbose pkgid client-frontend@0.1.0

15 verbose cwd C:\demo\stc-triathlon\STCRace_Handover_6e\STCRace_Handover_6e\2 Sourcecodes\STC-Race-Code\STC-Race-Code\client-frontend

16 verbose Windows_NT 6.1.7601

17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"

18 verbose node v10.14.2

19 verbose npm  v6.4.1

20 error code ELIFECYCLE

21 error errno 1

22 error client-frontend@0.1.0 start: `react-app-rewired start`

22 error Exit status 1

23 error Failed at the client-frontend@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 ]

更新:
感谢@BeliefRC 提醒,运行npm run start-fe后出现了下面的错误。

图片描述


推荐阅读
author-avatar
快乐生鹤
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有