简体   繁体   中英

npm ERR! code ELIFECYCLE when running npm run build command for react

Error: Parse Error: <title id=>Polygon NC</title>
  <link href="/static/css/main.522ad556.chunk.css" rel="stylesheet"></head>
  <body>
      <div id="root"></div>
  <script>!function(e){function r(r){for(var n,l,p=r[0],f=r[1],i=r[2],c=0,s=[];c  <p.length;c++)l=p[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o  [l][0]),o[l]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n  ]);for(a&&a(r);s.length;)s.shift()();return u.push.apply(u,i||[]),t()}function   t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,p=1;p<t.length;p++){var   f=t[p];0!==o[f]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},  o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,ex  ports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c  =n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:  t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.d  efineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"  __esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&  r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(  l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string  "!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));retu  rn t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:funct  ion(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototy  pe.hasOwnProperty.call(e,r)},l.p="/";var p=this["webpackJsonppolygon-nc"]=this  ["webpackJsonppolygon-nc"]||[],f=p.push.bind(p);p.push=r,p=p.slice();for(var i  =0;i<p.length;i++)r(p[i]);var a=f;t()}([]);
  //# sourceMappingURL=runtime-main.e22f45bd.js.map</script><script src="/static  /js/2.d9198708.chunk.js"></script><script src="/static/js/main.f83320f4.chunk.  js"></script></body>
  </html>

  - htmlparser.js:244 new HTMLParser
    [polygon-nc]/[html-minifier-terser]/src/htmlparser.js:244:13

  - htmlminifier.js:981 minify
    [polygon-nc]/[html-minifier-terser]/src/htmlminifier.js:981:3

  - htmlminifier.js:1342 Object.exports.minify
    [polygon-nc]/[html-minifier-terser]/src/htmlminifier.js:1342:16

  - index.js:445 HtmlWebpackPlugin.postProcessHtml
    [polygon-nc]/[html-webpack-plugin]/index.js:445:41

  - index.js:274
    [polygon-nc]/[html-webpack-plugin]/index.js:274:25

  - runMicrotasks

  - task_queues.js:97 processTicksAndRejections
    internal/process/task_queues.js:97:5


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! polygon-nc@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the polygon-nc@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
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   'build'
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.16.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle polygon-nc@0.1.0~prebuild: polygon-nc@0.1.0
6 info lifecycle polygon-nc@0.1.0~build: polygon-nc@0.1.0
7 verbose lifecycle polygon-nc@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle polygon-nc@0.1.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\polygon-nc\node_modules\.bin;C:\Users\Fady\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\Fady\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\swipl\bin;C:\Program Files\nodejs;C:\Users\Fady\AppData\Local\Programs\Python\Python38-32\Scripts;C:\Users\Fady\AppData\Local\Programs\Python\Python38-32;C:\Users\Fady\AppData\Local\Microsoft\WindowsApps;C:\src\flutter\bin;C:\Users\Fady\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Fady\.dotnet\tools;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3\bin;C:\NirCmd;C:\Users\Fady\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle polygon-nc@0.1.0~build: CWD: D:\polygon-nc
10 silly lifecycle polygon-nc@0.1.0~build: Args: [ '/d /s /c', 'react-scripts build' ]
11 silly lifecycle polygon-nc@0.1.0~build: Returned: code: 1  signal: null
12 info lifecycle polygon-nc@0.1.0~build: Failed to exec build script
13 verbose stack Error: polygon-nc@0.1.0 build: `react-scripts build`
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:311: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:311: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 polygon-nc@0.1.0
15 verbose cwd D:\polygon-nc
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 v12.16.1
19 verbose npm  v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error polygon-nc@0.1.0 build: `react-scripts build`
22 error Exit status 1
23 error Failed at the polygon-nc@0.1.0 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'm developing a react website and whenever i try to run "npm run build" command i get this error. I tried removing the file called package-lock.json and rerun the command but it still doesn't work and gives me the same error so i tried removing the modules and running npm install but i still get the same error. What am i doing wrong?

您是否尝试删除标题上的该id

<title id=>Polygon NC</title>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM