ionic-team / ionic-angular-standalone-codemods

MIT License
16 stars 8 forks source link

bug: Directory Not Found ./vscode/typings #44

Open selected-pixel-jameson opened 8 months ago

selected-pixel-jameson commented 8 months ago

Prerequisites

Codemod version

0.3.0

Current Behavior

I run npx @ionic/angular-standalone-codemods.

I'm prompted with the dry run option.

Regardless of the option I select I get the following error afterwards.

DirectoryNotFoundError: Directory not found: /xxxxxxxxxxx/.vscode/typings
    at RealFileSystemHost.getDirectoryNotFoundErrorIfNecessary (/Users/jamesonparker/.npm/_npx/ff04957b6f1fa49f/node_modules/@ts-morph/common/dist/ts-morph-common.js:1965:50)
    at RealFileSystemHost.readDirSync (/Users/jamesonparker/.npm/_npx/ff04957b6f1fa49f/node_modules/@ts-morph/common/dist/ts-morph-common.js:1874:24)
    at TransactionalFileSystem.readDirSync (/Users/jamesonparker/.npm/_npx/ff04957b6f1fa49f/node_modules/@ts-morph/common/dist/ts-morph-common.js:2501:55)
    at FileUtils.getDescendantDirectories (/Users/jamesonparker/.npm/_npx/ff04957b6f1fa49f/node_modules/@ts-morph/common/dist/ts-morph-common.js:1547:47)
    at getDescendantDirectories.next (<anonymous>)
    at FileUtils.getDescendantDirectories (/Users/jamesonparker/.npm/_npx/ff04957b6f1fa49f/node_modules/@ts-morph/common/dist/ts-morph-common.js:1551:30)
    at getDescendantDirectories.next (<anonymous>)
    at FileUtils.getDescendantDirectories (/Users/jamesonparker/.npm/_npx/ff04957b6f1fa49f/node_modules/@ts-morph/common/dist/ts-morph-common.js:1551:30)
    at getDescendantDirectories.next (<anonymous>)
    at DirectoryCoordinator.addDirectoryAtPathIfExists (/Users/jamesonparker/.npm/_npx/ff04957b6f1fa49f/node_modules/ts-morph/dist/ts-morph.js:18826:24) {
  path: '/xxxxxxxxxxx/.vscode/typings',
  code: 'ENOENT'

I have checked the .vscode directory and I only have a .launch file in there. So I'm not sure if I'm missing something or what.

Expected Behavior

I would expect the migration process to run

Steps to Reproduce

  1. npx @ionic/angular-standalone-codemods
  2. Select either option for Dry Run
  3. Error shows up

Code Reproduction URL

No response

Additional Information

If I create the missing typings directory it then references a cordova-ionic directory and then plugins.

This is my package.json file.

  "dependencies": {
    "@angular/animations": "^17.1.0",
    "@angular/common": "^17.1.0",
    "@angular/core": "^17.1.0",
    "@angular/forms": "^17.1.0",
    "@angular/platform-browser": "^17.1.0",
    "@angular/platform-browser-dynamic": "^17.1.0",
    "@angular/router": "^17.1.0",
    "@capacitor-community/apple-sign-in": "5.0.0",
    "@capacitor-community/facebook-login": "^5.0.0",
    "@capacitor-community/firebase-analytics": "^5.0.1",
    "@capacitor/android": "5.7.0",
    "@capacitor/app": "^5.0.6",
    "@capacitor/browser": "^5.0.6",
    "@capacitor/camera": "^5.0.8",
    "@capacitor/core": "^5.7.0",
    "@capacitor/device": "^5.0.6",
    "@capacitor/haptics": "^5.0.6",
    "@capacitor/ios": "5.7.0",
    "@capacitor/keyboard": "^5.0.6",
    "@capacitor/local-notifications": "^5.0.6",
    "@capacitor/preferences": "^5.0.6",
    "@capacitor/splash-screen": "^5.0.6",
    "@capacitor/status-bar": "5.0.6",
    "@capgo/camera-preview": "^6.0.6",
    "@ionic/angular": "^7.7.1",
    "@ionic/core": "^7.7.1",
    "@maskito/angular": "^1.7.0",
    "@maskito/core": "^1.7.0",
    "@maskito/kit": "^1.7.0",
    "@types/jquery": "^3.5.16",
    "badwords-list": "^1.0.0",
    "capacitor-rate-app": "4.0.3",
    "cordova-plugin-purchase": "^13.5.0",
    "kc-capacitor-image-utils": "file:../kc-capacitor-image-utils",
    "ngx-ui-tour-ionic": "^3.0.0",
    "onesignal-cordova-plugin": "^3.3.0",
    "rxjs": "^7.5.0",
    "smoothscroll-polyfill": "^0.4.4",
    "swiper": "^8.4.5",
    "tslib": "^2.3.0",
    "zone.js": "^0.14.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^17.0.0",
    "@angular-eslint/builder": "^17.0.0",
    "@angular-eslint/eslint-plugin": "^17.0.0",
    "@angular-eslint/eslint-plugin-template": "^17.0.0",
    "@angular-eslint/schematics": "^17.0.0",
    "@angular-eslint/template-parser": "^17.0.0",
    "@angular/cli": "^17.0.0",
    "@angular/compiler-cli": "^17.0.2",
    "@angular/language-service": "^17.0.2",
    "@capacitor/cli": "5.7.0",
    "@ionic/angular-toolkit": "11.0.1",
    "@types/jasmine": "~5.1.0",
    "@typescript-eslint/eslint-plugin": "^6.0.0",
    "@typescript-eslint/parser": "^6.0.0",
    "eslint": "^7.26.0",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jsdoc": "30.7.6",
    "eslint-plugin-prefer-arrow": "1.2.2",
    "jasmine-core": "~5.1.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.2.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.1.0",
    "ts-node": "^8.3.0",
    "typescript": "~5.2.2"
  },
maniya108 commented 8 months ago

I am also facing the same problem since 2 weeks but no luck. @mhartington Please help us to resolve this error.

liamdebeasi commented 8 months ago

Hey there,

Can you provide a GitHub repo that I can use to reproduce the issue? The team is unable to reproduce this issue using a new project.

selected-pixel-jameson commented 8 months ago

@liamdebeasi Unfortunately I cannot. This is a client project and I cannot share the code without legal ramifications. I would assume that it has something to do with including cordova plugins.

Specifically "cordova-plugin-purchase": "^13.5.0",

The Angular migration tool worked without any issues, but that obviously isn't going to handle migrating all of the Ion Components. I manually ended up doing this. Took me about 8-10 hours.