npm install 和 ionic build 不会安装所有节点模块



我需要构建一个现有的Ionic应用程序,但我遇到了node_modules问题。我有以下包.json

{
"name": "My App",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/animations": "5.2.11",
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/compiler-cli": "5.2.11",
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@ionic-native/core": "4.7.0",
"@ionic-native/device": "^4.7.0",
"@ionic-native/in-app-browser": "^4.9.2",
"@ionic-native/local-notifications": "^4.10.0",
"@ionic-native/splash-screen": "4.7.0",
"@ionic-native/status-bar": "4.7.0",
"@ionic/storage": "^2.1.3",
"cordova-android": "~7.0.0",
"cordova-plugin-badge": "^0.8.7",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-inappbrowser": "^3.0.0",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^1.1.19",
"cordova-plugin-local-notification": "^0.9.0-beta.2",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"montserrat-ionic": "0.0.3",
"node-sass": "^4.13.0",
"rxjs": "5.5.11",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "3.2.4",
"typescript": "~2.6.2"
},
"description": "App",
"cordova": {
"plugins": {
"cordova-plugin-device": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-local-notification": {}
},
"platforms": [
"android"
]
}
}

我运行了npm install,然后安装了一些软件包:

es5-ext
es6-iterator
es6-symbol
ext
ext-tick

然后我跑ionic build,我得到:

[INFO] Looks like @ionic/app-scripts isn't installed in this project.
This package is required for this command to work properly.
? Install @ionic/app-scripts?

我提示是的,然后安装了许多软件包:

added 571 packages from 604 contributors and audited 6254 packages in 45.72s

但是我得到了一个错误

[13:07:56]  ionic-app-script task: "build"
[13:07:56]  Error: ENOENT: no such file or directory, open
'C:...Appnode_modules@angularcorepackage.json'
Error: ENOENT: no such file or directory, open 'C:..Appnode_modules@angularcorepackage.json'

我注意到@angular目录未创建。


全局设置:

角度 CLI:8.3.20 节点:10.16.3

Ionic CLI : 5.4.13 (C:...\AppData\Roamingpmode_modules\ionic(

离子框架:未安装

@ionic/应用程序脚本:3.2.4

科尔多瓦命令行界面 : 9.0.0 (科尔多瓦-lib@9.0.1(

科尔多瓦平台 : 不可用

科尔多瓦插件 : 不可用

问题出在 package.json 文件中

"description"在错误的位置,"name"不应该有空间。修复文件后,npm install正常工作。

{
"name": "MyApp",
"description: ""
......
}

相关内容

  • 没有找到相关文章

最新更新