Issues After Upgrading package.json and tsconfig.json in Ionic Project

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.

Welcome! Please update your question with proper code blocks so we can easily read your configs - Extended Syntax | Markdown Guide.

Yes, @ionic-native was deprecated in 2021 and changed over to awesome-cordova-plugins. See A New Chapter for @ionic-native - Ionic Blog.

hank you for your prompt response. I am a beginner developer working with Ionic. If I change this package, could it cause any issues in my project? The project is quite old, and I’m attempting to upgrade it. Will this package affect my code, considering there have been major changes?