根据CxJS快速入门指南,以下命令:
md my-app cd my-app npm init -y npm install cx-cli --global cx脚手架 npm start
结果:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN cx@17.10.6 requires a peer of @types/react@^16.0.5 but none was installed.
npm WARN my-app@1.0.0 No description
npm WARN my-app@1.0.0 No repository field.
PS C:\Temporary\Work\CxJS\my-app> npm start
> my-app@1.0.0 start C:\Temporary\Work\CxJS\my-app
> webpack-dev-server --config config/webpack.dev.js --open
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EACCES 127.0.0.1:8088
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at Server._listen2 (net.js:1245:19)
at listen (net.js:1294:10)
at net.js:1404:9
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:81:10)
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Network Tools\\Server\\Node.js\\node.exe" "C:\\Network Tools\\Server\\Node.js\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! my-app@1.0.0 start: `webpack-dev-server --config config/webpack.dev.js --open`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@1.0.0 start script 'webpack-dev-server --config config/webpack.dev.js --open'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the my-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --config config/webpack.dev.js --open
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs my-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls my-app
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Temporary\Work\CxJS\my-app\npm-debug.log
和npm-debug.log包含:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Network Tools\\Server\\Node.js\\node.exe',
1 verbose cli 'C:\\Network Tools\\Server\\Node.js\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm@3.10.10
3 info using node@v6.11.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle my-app@1.0.0~prestart: my-app@1.0.0
6 silly lifecycle my-app@1.0.0~prestart: no script for prestart, continuing
7 info lifecycle my-app@1.0.0~start: my-app@1.0.0
8 verbose lifecycle my-app@1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle my-app@1.0.0~start: PATH: C:\Network Tools\Server\Node.js\node_modules\npm\bin\node-gyp-bin;C:\Temporary\Work\CxJS\my-app\node_modules\.bin;C:\Development Tools\Utility\Source Control\Codice\Plastic\server;C:\Development Tools\Utility\Source Control\Codice\Plastic\client;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Git\cmd;C:\Development Tools\Environments\Microsoft\Visual Studio\2017\MSBuild\ReadyRoll\OctoPack\build;C:\Network Tools\Server\Node.js\;C:\Users\Maxeta\AppData\Local\Microsoft\WindowsApps;C:\Development Tools\Environments\Sencha\CMD;C:\Development Tools\Utility\Advanced Editors\VSCode\bin;C:\Network Tools\Utility\Fiddler;C:\Users\Maxeta\AppData\Roaming\npm
10 verbose lifecycle my-app@1.0.0~start: CWD: C:\Temporary\Work\CxJS\my-app
11 silly lifecycle my-app@1.0.0~start: Args: [ '/d /s /c',
11 silly lifecycle 'webpack-dev-server --config config/webpack.dev.js --open' ]
12 silly lifecycle my-app@1.0.0~start: Returned: code: 1 signal: null
13 info lifecycle my-app@1.0.0~start: Failed to exec start script
14 verbose stack Error: my-app@1.0.0 start: `webpack-dev-server --config config/webpack.dev.js --open`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Network Tools\Server\Node.js\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Network Tools\Server\Node.js\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:920:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
15 verbose pkgid my-app@1.0.0
16 verbose cwd C:\Temporary\Work\CxJS\my-app
17 error Windows_NT 10.0.15063
18 error argv "C:\\Network Tools\\Server\\Node.js\\node.exe" "C:\\Network Tools\\Server\\Node.js\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 error node v6.11.3
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error my-app@1.0.0 start: `webpack-dev-server --config config/webpack.dev.js --open`
22 error Exit status 1
23 error Failed at the my-app@1.0.0 start script 'webpack-dev-server --config config/webpack.dev.js --open'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the my-app package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error webpack-dev-server --config config/webpack.dev.js --open
23 error You can get information on how to open an issue for this project with:
23 error npm bugs my-app
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls my-app
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
我的节点版本是6.11.3,npm是3.10.10,我认为应该是最近的。任何人都可以提供一些见解。我试图评估CxJS作为ExtJS的替代品,但截至目前,我已经陷入困境。
答案 0 :(得分:2)
Error: listen EACCES 127.0.0.1:8088
意味着该流程无法声明该端口。检查端口8088上是否还没有运行某些东西