为什么在项目中安装npm时会出现EBADPLATFORM错误?

问题描述 投票:1回答:1

我从git克隆了我的离子项目,当我尝试在其中安装'npm install'时,出现了此错误,唯一的区别是它是32位Windows操作系统,而上一个是我将代码推送到github的64位Windows操作系统

    npm ERR! code EBADPLATFORM
    npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
    npm ERR! notsup Valid OS:    darwin
    npm ERR! notsup Valid Arch:  any
    npm ERR! notsup Actual OS:   win32
    npm ERR! notsup Actual Arch: ia32

我也尝试过npm install --no-optional我检查了我的package.json文件,其中不包含fsevents

MY package.json

"name": "sindhi_app",
"version": "0.1.0",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"start": "ionic-app-scripts serve",
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint"
},
"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/android-permissions": "^4.20.0",
"@ionic-native/camera": "~4.17.0",
"@ionic-native/code-push": "^4.20.0",
"@ionic-native/core": "~4.17.0",
"@ionic-native/file": "~4.17.0",
"@ionic-native/file-transfer": "~4.17.0",
"@ionic-native/photo-viewer": "~4.17.0",
"@ionic-native/sms": "^4.20.0",
"@ionic-native/splash-screen": "~4.17.0",
"@ionic-native/status-bar": "~4.17.0",
"@ionic/storage": "2.2.0",
"code-push": "2.0.6",
"com-sarriaroman-photoviewer": "^1.1.18",
"cordova-android": "^7.0.0",
"cordova-browser": "5.0.4",
"cordova-custom-config": "^5.0.3",
"cordova-plugin-android-permissions": "1.0.0",
"cordova-plugin-camera": "~4.0.3",
"cordova-plugin-code-push": "1.11.17",
"cordova-plugin-datepicker": "^0.9.3",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-dialogs": "2.0.1",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-ionic-keyboard": "^2.1.2",
"cordova-plugin-ionic-webview": "^2.1.4",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-zip": "^3.1.0",
"cordova-sms-plugin": "1.0.0",
"ionic-angular": "3.9.2",
"ionic-img-viewer": "^2.9.0",
"ionicons": "3.0.0",
"rxjs": "5.5.11",
"rxjs-compat": "^6.3.3",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "3.2.1",
"@ionic/lab": "1.0.18",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-datepicker": {},
"cordova-plugin-camera": {},
"cordova-plugin-file": {},
"cordova-plugin-file-transfer": {},
"cordova-custom-config": {},
"cordova-sms-plugin": {},
"cordova-plugin-android-permissions": {},
"cordova-plugin-code-push": {},
"cordova-plugin-zip": {}
},
"platforms": [
"browser",
"android"
]
}
}```
android windows npm ionic3
1个回答
0
投票

将以下内容添加到项目的package.json

© www.soinside.com 2019 - 2024. All rights reserved.