Coder Social home page Coder Social logo

Comments (8)

iwinstar1980 avatar iwinstar1980 commented on May 5, 2024

redux-demo执行 npm start的时候抛出的错误信息

[email protected] start H:\Python\JS\jstraining\demos\redux-demo
webpack-dev-server --devtool eval --progress --hot --content-base app
70% 1/1 build modulesevents.js:174
throw er; // Unhandled 'error' event
^

Error: listen EACCES: permission denied 127.0.0.1:8080
at Server.setupListenHandle [as _listen2] (net.js:1260:19)
at listenInCluster (net.js:1325:12)
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1458:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:62:10)
Emitted 'error' event at:
at emitErrorNT (net.js:1304:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: webpack-dev-server --devtool eval --progress --hot --content-base app
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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:

from jstraining.

ruanyf avatar ruanyf commented on May 5, 2024

目录没权限报错,Windows 系统不熟悉。你以 Administrator 的身份运行试试看。

from jstraining.

iwinstar1980 avatar iwinstar1980 commented on May 5, 2024

用管理员权限启动cmd,执行npm start 还是不行

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\U577288\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 info lifecycle [email protected]
start: [email protected]
7 verbose lifecycle [email protected]start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
start: PATH: C:\Users\U577288\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;H:\Python\JS\jstraining\demos\mobx-demo\node_modules.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:\Program Files\TortoiseSVN\bin;C:\Program Files\Git\cmd;C:\Program Files\Microsoft VS Code\bin;C:\Java\jdk1.8.0_201\bin;C:\Java\jdk1.8.0_201\jre\bin;C:\apache-maven-3.6.0\bin;C:\Program Files\PowerShell\6;C:\Program Files\nodejs;C:\Python37\Scripts;C:\Python37;C:\Users\U577288\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PyCharm 2018.3.2\bin;C:\Users\U577288\AppData\Roaming\npm
9 verbose lifecycle [email protected]start: CWD: H:\Python\JS\jstraining\demos\mobx-demo
10 silly lifecycle [email protected]
start: Args: [ '/d /s /c',
10 silly lifecycle 'webpack-dev-server --devtool eval --progress --hot --content-base app' ]
11 silly lifecycle [email protected]start: Returned: code: 1 signal: null
12 info lifecycle [email protected]
start: Failed to exec start script
13 verbose stack Error: [email protected] start: webpack-dev-server --devtool eval --progress --hot --content-base app
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Users\U577288\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess. (C:\Users\U577288\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd H:\Python\JS\jstraining\demos\mobx-demo
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\U577288\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start"
18 verbose node v10.15.1
19 verbose npm v6.8.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: webpack-dev-server --devtool eval --progress --hot --content-base app
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

from jstraining.

ruanyf avatar ruanyf commented on May 5, 2024

Mac 下面是正常的。

你删掉 node_modules 目录,用管理员身份重新安装依赖npm install试试看。

from jstraining.

iwinstar1980 avatar iwinstar1980 commented on May 5, 2024

重新执行 npm install之后的结果信息如下,然后再执行 npm start 还是一样的错误

npm install
npm WARN [email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 704 packages from 585 contributors and audited 5124 packages in 75.049s
found 5 vulnerabilities (2 low, 1 high, 2 critical)
run npm audit fix to fix them, or npm audit for details

from jstraining.

iwinstar1980 avatar iwinstar1980 commented on May 5, 2024

看上面给出的信息应该是操作系统不支持,导致fsevents这个包没有安装成功导致的

from jstraining.

ruanyf avatar ruanyf commented on May 5, 2024

copy-webpack-plugin 这个插件需要 Webpack 4.x。目前,没时间修这个问题。

建议在其他操作系统上运行这个 demo。

from jstraining.

iwinstar1980 avatar iwinstar1980 commented on May 5, 2024

好的,我装个虚拟机试一下,可能的话,希望您有时间的时候能够修复这个问题

from jstraining.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.