我正在使用 Ionic 进行项目开发。在运行 ionic serve 时,出现了关于 "@fullcalendar/angular" 缺少依赖的错误。
错误信息:
[ng] ERROR in The target entry-point "@fullcalendar/angular" has missing dependencies:
[ng] - @fullcalendar/core/types/input-types
[ng] - @fullcalendar/core/datelib/env
[ng] - @fullcalendar/core/datelib/duration
[ng] - @fullcalendar/core/datelib/formatting
[ng] - @fullcalendar/core/datelib/date-range
[ng] - @fullcalendar/core/datelib/locale
[ng] - @fullcalendar/core/validation
[ng] - @fullcalendar/core/structs/event-source
package.json 文件:
{
"name": "new_eleave_main",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "~9.1.6",
"@angular/core": "~9.1.6",
"@angular/forms": "~9.1.6",
"@angular/platform-browser": "~9.1.6",
"@angular/platform-browser-dynamic": "~9.1.6",
"@angular/router": "~9.1.6",
"@fullcalendar/angular": "^4.4.5-beta",
"@fullcalendar/core": "^4.4.0",
"@fullcalendar/daygrid": "^4.4.0",
"@fullcalendar/interaction": "^4.4.0",
"@fullcalendar/timegrid": "^4.4.0",
"@ionic-native/core": "^5.0.7",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^5.0.0",
"@zencomputersystems/eleave-admin": "0.0.2",
"@zencomputersystems/eleave-user": "0.0.1",
"add": "^2.0.6",
"ncu": "^0.2.1",
"npm-check": "^5.9.2",
"rxjs": "~6.5.1",
"tslib": "^1.12.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.901.5",
"@angular/cli": "~9.1.5",
"@angular/compiler": "~9.1.6",
"@angular/compiler-cli": "~9.1.6",
"@angular/language-service": "~9.1.6",
"@ionic/angular-toolkit": "^2.1.1",
"@types/node": "^12.11.1",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~3.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.3",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.8.3"
},
"description": "An Ionic project"
}
tsconfig.json文件:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
我的 Angular 版本:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 9.1.8
Node: 12.15.0
OS: win32 x64
Angular: 9.1.11
... common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.901.8
@angular-devkit/build-angular 0.901.8
@angular-devkit/build-optimizer 0.901.8
@angular-devkit/build-webpack 0.901.8
@angular-devkit/core 9.1.8
@angular-devkit/schematics 9.1.8
@angular/animations 7.2.16
@angular/cdk 7.3.7
@angular/cli 9.1.8
@angular/http 7.1.4
@angular/material 7.3.7
@ngtools/webpack 9.1.8
@schematics/angular 9.1.8
@schematics/update 0.901.8
rxjs 6.5.5
typescript 3.8.3
webpack 4.42.0
我的 Ionic 信息:
Ionic:
Ionic CLI : 5.2.3 (C:\Users\Nor Hanani Rafei\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 5.2.1
@angular-devkit/build-angular : 0.901.8
@angular-devkit/schematics : 9.1.8
@angular/cli : 9.1.8
@ionic/angular-toolkit : 2.2.0
Utility:
cordova-res : not installed
native-run : 0.2.8
System:
NodeJS : v12.15.0 (C:\Program Files\nodejs\node.exe)
npm : 6.13.4
OS : Windows 10
`
复现步骤:
1. 运行 npm i 命令
2. 运行 ionic serve 命令
求助!我陷入了近两周的困境。非常感谢!