angular.js - angularjs官网Demo quickstart-master在win10系统中启动时报错
问题描述
在cmd中npm start时报错
在项目目录中的日志文件内容是:0 info it worked if it ends with ok1 verbose cli [ ’C:Program Filesnodejsnode.exe’,1 verbose cli ’C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js’,1 verbose cli ’start’ ]2 info using npm@3.8.93 info using node@v6.2.04 verbose run-script [ ’prestart’, ’start’, ’poststart’ ]5 info lifecycle angular2-quickstart@1.0.0~prestart: angular2-quickstart@1.0.06 silly lifecycle angular2-quickstart@1.0.0~prestart: no script for prestart, continuing7 info lifecycle angular2-quickstart@1.0.0~start: angular2-quickstart@1.0.08 verbose lifecycle angular2-quickstart@1.0.0~start: unsafe-perm in lifecycle true9 verbose lifecycle angular2-quickstart@1.0.0~start: PATH: C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin;C:gitCodeasp.netmvcCodeasp.netmvcangularJSangularjs001node_modules.bin;C:Program Filesnodejs;C:UsersOliverAppDataRoamingnpm;C:Program Filesnodejs;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)ATI TechnologiesATI.ACECore-Static;C:Program Files (x86)Windows Kits8.1Windows Performance Toolkit;C:Program FilesMicrosoft SQL Server110ToolsBinn;C:Program Files (x86)Microsoft SQL Server100ToolsBinn;C:Program FilesMicrosoft SQL Server100ToolsBinn;C:Program FilesMicrosoft SQL Server100DTSBinn;C:Program Files (x86)Microsoft SQL Server100ToolsBinnVSShellCommon7IDE;C:Program Files (x86)Microsoft Visual Studio 9.0Common7IDEPrivateAssemblies;C:Program Files (x86)Microsoft SQL Server100DTSBinn;C:Program FilesTortoiseSVNbin;C:Program Files (x86)Javajdk1.8.0_91binjava.exe;C:Program Files (x86)Javajdk1.8.0_91binjavac.exe;C:Program Files (x86)Javajdk1.8.0_91bin;C:Program Files (x86)Javajre1.8.0_91bin;C:Program Files (x86)Microsoft SDKsTypeScript1.0;C:Program FilesMicrosoft SQL Server120ToolsBinn;C:UsersOliver.dnxbin;C:Program FilesMicrosoft DNXDnvm;C:Program Filesnodejs;C:UsersOliverAppDataRoamingnpm10 verbose lifecycle angular2-quickstart@1.0.0~start: CWD: C:gitCodeasp.netmvcCodeasp.netmvcangularJSangularjs00111 silly lifecycle angular2-quickstart@1.0.0~start: Args: [ ’/d /s /c’,11 silly lifecycle ’tsc && concurrently 'npm run tsc:w' 'npm run lite' ’ ]12 silly lifecycle angular2-quickstart@1.0.0~start: Returned: code: 2 signal: null13 info lifecycle angular2-quickstart@1.0.0~start: Failed to exec start script14 verbose stack Error: angular2-quickstart@1.0.0 start: tsc && concurrently 'npm run tsc:w' 'npm run lite' 14 verbose stack Exit status 214 verbose stack at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmlibutilslifecycle.js:245: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:Program Filesnodejsnode_modulesnpmlibutilsspawn.js:24: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:850:16)14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)15 verbose pkgid angular2-quickstart@1.0.016 verbose cwd C:gitCodeasp.netmvcCodeasp.netmvcangularJSangularjs00117 error Windows_NT 10.0.1024018 error argv 'C:Program Filesnodejsnode.exe' 'C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js' 'start'19 error node v6.2.020 error npm v3.8.921 error code ELIFECYCLE22 error angular2-quickstart@1.0.0 start: tsc && concurrently 'npm run tsc:w' 'npm run lite' 22 error Exit status 223 error Failed at the angular2-quickstart@1.0.0 start script ’tsc && concurrently 'npm run tsc:w' 'npm run lite' ’.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 angular2-quickstart package,23 error not with npm itself.23 error Tell the author that this fails on your system:23 error tsc && concurrently 'npm run tsc:w' 'npm run lite'23 error You can get information on how to open an issue for this project with:23 error npm bugs angular2-quickstart23 error Or if that isn’t available, you can get their info via:23 error npm owner ls angular2-quickstart23 error There is likely additional logging output above.24 verbose exit [ 1, true ]
问题解答
回答1:先检查下相应的包正确安装了没 node执行下npm install -g concurrentlynpm install -g lite-servernpm install -g typescript
这样安装完还是不行的话 试试修改package.json的文件'start': 'tsc && concurrently 'npm run tsc:w' 'npm run lite' ' 改成下面这样'start': 'concurrently 'npm run tsc:w' 'npm run lite' '
回答2:试着2楼解答问题解决,谢谢!
相关文章:
1. javascript - jQuery中live事件在移动微信端下没有效果;代码如下2. javascript - 请问一下react-native 布局的时候,尺寸的大小是如何确定的呢?3. javascript - 小白求解:mac 下如何设置nodejs express的 NODE_NEV 环境变量4. javascript - avalon.js ms-on 事件绑定无效 ?5. html5 - 目前 公司App 嵌入H5页面 做个 手机支付功能 没有做过 所以 请求各位有经验的 给个思路6. mysql5.7 json查询支持7. Python如何考虑代码注入安全?8. 找一个权威、实战的微信扫码授权登录网站的开发教程或者文章9. javascript - js 修改表格元素的,可以用DOM操作实现吗?10. javascript - 实参和形参有哪些通俗的命名吗?尤其形参