Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to migrate from legacy localization IDs when having webworker in a project #20930

Closed
1 of 15 tasks
destus90 opened this issue May 25, 2021 · 3 comments · Fixed by #20931
Closed
1 of 15 tasks

Not able to migrate from legacy localization IDs when having webworker in a project #20930

destus90 opened this issue May 25, 2021 · 3 comments · Fixed by #20931

Comments

@destus90
Copy link
Contributor

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

No

Description

I would like to migrate legacy localization IDs to IDs that use the latest algorithms using this guide https://angular.io/guide/migration-legacy-message-id. I am not able to do it as ng extract-i18n --format=legacy-migrate gives me an error that my webworker file is missing from the TypeScript compilation.

🔬 Minimal Reproduction

  1. git clone https://github.com/destus90/worker-migrating-legacy-IDs
  2. npm ci
  3. ng extract-i18n --format=legacy-migrate

🔥 Exception or Error


worker-migrating-legacy-IDs\src\app\worker.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
    at C:\Users\...\worker-migrating-legacy-IDs\node_modules\@ngtools\webpack\src\ivy\loader.js:43:26

🌍 Your Environment





     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 12.0.1
Node: 14.15.0
Package Manager: npm 6.14.8
OS: win32 x64

Angular: 12.0.1
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.1
@angular-devkit/build-angular   12.0.1
@angular-devkit/core            12.0.1
@angular-devkit/schematics      12.0.1
@schematics/angular             12.0.1
rxjs                            6.6.7
typescript                      4.2.4

Anything else relevant?

@alan-agius4 alan-agius4 transferred this issue from angular/angular-cli May 25, 2021
@alan-agius4 alan-agius4 transferred this issue from angular/angular May 25, 2021
@ngbot ngbot bot modified the milestone: Backlog May 25, 2021
@petebacondarwin
Copy link
Contributor

Given that this is a one-shot process, you can temporarily fix the tsconfig.app.json to allow the build to complete:

/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "./out-tsc/app",
    "types": [],
    "skipLibCheck": true
  },
  "files": [
    "src/main.ts",
    "src/polyfills.ts",
    "src/app/worker.ts"
  ],
  "include": [
    "src/**/*.d.ts"
  ]
}

The difference is I have added "src/app/worker.ts" to the "files" and also set "skipLibCheck": true.

@destus90
Copy link
Contributor Author

@petebacondarwin
thanks, it works :)

clydin pushed a commit that referenced this issue May 25, 2021
clydin pushed a commit that referenced this issue May 25, 2021
…ion that uses web-workers

Closes #20930

(cherry picked from commit 6e07cb1)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants