Hello Ionic community,
I recently upgraded my package.json
to the latest versions, and now I’m facing an issue with my tsconfig.json
file. Here are the details:
My package.json
:
{
“name”: “test”,
“version”: “0.0.3”,
“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”,
“postinstall”: “npx jetify”,
“resources”: “cordova-res ios && cordova-res android && node scripts/resources.js”
},
“private”: true,
“dependencies”: {
“@angular/common”: “^18.2.4”,
“@angular/core”: “^18.2.4”,
// (other dependencies)
“@ionic/angular”: “^7.8.6”
},
“devDependencies”: {
“@angular-devkit/build-angular”: “^17.0.0”,
// (other devDependencies)
“typescript”: “4.9.0”
},
“description”: “An Ionic project”
}
**Issue with tsconfig.json**
:
I’m receiving an error regarding the starting braces in my tsconfig.json
file. Here’s the content of my tsconfig.json
:
{
“compilerOptions”: {
“target”: “es6”,
“module”: “commonjs”,
“strict”: true,
“esModuleInterop”: true,
“skipLibCheck”: true,
“forceConsistentCasingInFileNames”: true
},
“include”: [“src/**/*”],
“exclude”: [“node_modules”]
}
Error :[{
“resource”: “/home/Desktop/Mobile-app-file/tsconfig.json”,
“owner”: “typescript”,
“severity”: 8,
“message”: “Cannot find type definition file for ‘@ionic/angular’.\n The file is in the program because:\n Entry point of type library ‘@ionic/angular’ specified in compilerOptions”,
“source”: “ts”,
“startLineNumber”: 1,
“startColumn”: 1,
“endLineNumber”: 1,
“endColumn”: 2
}]
- I know this package.json has several compatibility issues because some packages do not support the latest versions of native packages.
- What could be causing the error with the starting braces?
- The last update for the Ionic-native package was several years ago.This means it may not be compatible with some other packages.