Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
439 views
in Technique[技术] by (71.8m points)

reactjs - npm run build fails with exit status 1

I am trying to build my React app that built fine before I added TypeScript to the project. The debug log looks like this:

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   'build'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: C:Program Files
odejs
ode_modules
pm
ode_modules
pm-lifecycle
ode-gyp-bin;C:Users
ayjaDesktopWeb ProjectsfyahPayfyahpay_web_app
ode_modules.bin;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsiCLS;C:Program FilesIntelIntel(R) Management Engine ComponentsiCLS;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32OpenSSH;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program Filesdotnet;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:Program FilesMATLABR2017a
untimewin64;C:Program FilesMATLABR2017ain;C:Program Files (x86)Microsoft Visual Studio 14.0VCinamd64_x86cl.exe;C:Program FilesPuTTY;C:Program FilesLLVMin;C:MinGWin;C:Users
ayjaDesktopOpenCV Projectsopencvuildx64vc14in;C:Users
ayjaDesktopWeb Projectsemsdkupstreamemscripten;C:ProgramDatachocolateyin;C:Program Files
odejs;C:Program FilesJavajdk1.8.0_211in;C:Users
ayjaAppDataLocalAndroidSdkplatform-tools;C:Program FilesJavajdk-13in;C:Users
ayjaDesktopWeb Projectsemsdk;C:Users
ayjaDesktopWeb Projectsemsdkupstreamemscripten;C:Users
ayjaDesktopWeb Projectsemsdk
ode12.9.1_64bitin;C:Users
ayjaDesktopWeb Projectsemsdkpython3.7.4-pywin32_64bit;C:Users
ayjaDesktopWeb Projectsemsdkjava8.152_64bitin;C:Users
ayjaAppDataLocalProgramsPythonPython38-32Scripts;C:Users
ayjaAppDataLocalProgramsPythonPython38-32;E:JDKOpenJDKopenjdk-8u262-b10in;E:AndroidSdkplatform-tools;C:Python38;C:Python38Scripts;C:Program FilesWasmtimein;C:Users
ayja.wasmerin;C:Users
ayja.wasmerglobalswapm_packages.bin;C:Program FilesCMakein;C:Program FilesGitcmd;C:Users
ayjaAppDataLocalProgramsPythonPython38-32Scripts;C:Users
ayjaAppDataLocalProgramsPythonPython38-32;C:Program Files (x86)Elm.19.1in;C:Users
ayjaAppDataLocalMicrosoftWindowsApps;C:Users
ayjaAppDataLocalJetBrainsPyCharm 2018.3.1in;C:Program FilesJetBrainsPyCharm Community Edition 2018.3.2in;C:Program Filesherokuin;C:Users
ayjaAppDataLocalGitHubDesktopin;C:Users
ayjaAppDataLocalGoogleCloud SDKgoogle-cloud-sdkin;C:Users
ayjaAppDataLocalProgramsMicrosoft VS Codein;C:Users
ayjaAppDataRoaming
pm;C:Program FilesJavajdk-13in;C:Program FilesWasmtimein;;C:Users
ayja.wasmerin
9 verbose lifecycle [email protected]~build: CWD: C:Users
ayjaDesktopWeb ProjectsfyahPayfyahpay_web_app
10 silly lifecycle [email protected]~build: Args: [ '/d /s /c', 'react-scripts build' ]
11 silly lifecycle [email protected]~build: Returned: code: 1  signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: `react-scripts build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:Program Files
odejs
ode_modules
pm
ode_modules
pm-lifecycleindex.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (C:Program Files
odejs
ode_modules
pm
ode_modules
pm-lifecyclelibspawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1051:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid [email protected]
15 verbose cwd C:Users
ayjaDesktopWeb ProjectsfyahPayfyahpay_web_app
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" "build"
18 verbose node v14.3.0
19 verbose npm  v6.14.5
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: `react-scripts build`
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

I tried deleting node_modules and package-lock.json and then running npm i but that didn't work. The problem still persists.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...