在Windows 10上运行我的第一个离子应用程序时出错

时间:2018-11-21 03:02:59

标签: node.js angular ionic-framework npm ionic3

我有一个使用离子“空白”模板构建的非常简单的应用程序。

ionic start ionic-rnd-app blank

当我运行ionic serve命令时,出现以下错误

错误

> ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] 'ionic-app-scripts' is not recognized as an internal or external command,
[app-scripts] operable program or batch file.

[INFO] Looks like @ionic/app-scripts isn't installed in this project.

       This package is required for this command to work properly. The package provides a CLI utility, but the
       ionic-app-scripts binary was not found in your PATH.

? Install @ionic/app-scripts? Yes
> npm i -D -E @ionic/app-scripts
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @ionic/app-scripts@3.2.0
updated 1 package and audited 6164 packages in 8.656s
found 5 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
> ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] 'ionic-app-scripts' is not recognized as an internal or external command,
[app-scripts] operable program or batch file.
[ERROR] ionic-app-scripts command not found.

离子信息

Ionic:

   ionic (Ionic CLI)  : 4.3.1 (C:\Users\Nital\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

System:

   NodeJS : v10.13.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

节点-v

v10.13.0

npm -v

6.4.1

ng --version

Angular CLI: 7.0.6
Node: 10.13.0
OS: win32 x64
Angular: 5.2.11
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.10.6 (cli-only)
@angular-devkit/build-optimizer   0.0.35
@angular-devkit/core              7.0.6 (cli-only)
@angular-devkit/schematics        7.0.6 (cli-only)
@schematics/angular               7.0.6 (cli-only)
@schematics/update                0.10.6 (cli-only)
rxjs                              5.5.11
typescript                        2.6.2
webpack                           3.8.1

注意:不确定这是否重要,但是我的计算机上未安装ANDROID_SDK。

0 个答案:

没有答案