找不到模块&;#39;@Angel/core&;#39;。在我的Ionic应用程序中 [英] Cannot find module '@angular/core'. in my ionic app
本文介绍了找不到模块&;#39;@Angel/core&;#39;。在我的Ionic应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在构建一个离子应用程序,但当我添加一个新页面时,它会给我这个错误。
找不到模块"@ANGLING/core"
当从‘@Angel/core’导入{Component}时; 我检查了NODE_MODULES文件夹,在@ANGLING文件夹下没有找到core文件夹。 Ionic CLI版本:4.4.0
我尝试卸载并重新安装NPM,但不起作用。
Package.json文件:
{
"name": "fuberSims",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"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/cdk": "^5.2.4",
"@angular/common": "4.1.3",
"@angular/compiler": "4.1.3",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.1.3",
"@angular/forms": "4.1.3",
"@angular/http": "4.1.3",
"@angular/material": "^4.1.3",
"@angular/platform-browser": "4.1.3",
"@angular/platform-browser-dynamic": "4.1.3",
"@ionic-native/camera": "^4.7.0",
"@ionic-native/core": "4.4.0",
"@ionic-native/device": "^4.5.3",
"@ionic-native/diagnostic": "^4.7.0",
"@ionic-native/email-composer": "^4.17.0",
"@ionic-native/file": "^4.7.0",
"@ionic-native/file-path": "^4.7.0",
"@ionic-native/geolocation": "^4.5.3",
"@ionic-native/location-accuracy": "^4.7.0",
"@ionic-native/splash-screen": "4.4.0",
"@ionic-native/status-bar": "^4.9.0",
"@ionic-native/transfer": "^3.14.0",
"@ionic/storage": "^2.1.3",
"cordova-android": "7.0.0",
"cordova-plugin-camera": "^4.0.2",
"cordova-plugin-device": "^2.0.1",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-filepath": "^1.3.0",
"cordova-plugin-geolocation": "^4.0.1",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-request-location-accuracy": "^2.2.2",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova.plugins.diagnostic": "^4.0.8",
"ionic-angular": "3.9.2",
"ionic-scrolling-header": "^0.1.1",
"ionicons": "3.0.0",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.8",
"typescript": "2.4.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
},
"cordova-plugin-camera": {},
"cordova-plugin-file": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-filepath": {},
"cordova-plugin-request-location-accuracy": {},
"cordova.plugins.diagnostic": {}
},
"platforms": [
"android"
]
}
}
推荐答案
我通过从项目中删除NODE_MODULES文件夹并再次运行npm安装程序解决了此问题。
这篇关于找不到模块&;#39;@Angel/core&;#39;。在我的Ionic应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文