I’m trying to upgrade Angular 12 to 13. But in the end, I’d like to upgrade to v16, just fyi.
First of all, I upgraded angular/cli, core, ngx-build-plus, material, typescript for angular 13.
In my angular.json, I have this.
"architect": {
"build": {
"builder": "ngx-build-plus:browser",
"options": {
"outputPath": "dist/widget-v2",
"index": "",
"main": "projects/c-component/src/main.ts",
"polyfills": "projects/c-component/src/polyfills.ts",
"tsConfig": "projects/c-component/tsconfig.lib.json",
"aot": true,
"assets": [
"projects/chat-component/src/assets",
],
"stylePreprocessorOptions": {
"includePaths": [
"node_modules/"
]
},
"scripts": [
{
"bundleName": "polyfill-webcomp-es5",
"input": "node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"
},
{
"bundleName": "polyfill-webcomp",
"input": "node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js"
},
"node_modules/rxjs/bundles/rxjs.umd.js",
"node_modules/@angular/core/bundles/core.umd.js",
"node_modules/@angular/animations/bundles/animations.umd.js",
"node_modules/@angular/material/bundles/material.umd.js",
"node_modules/@angular/cdk/bundles/cdk.umd.js",
"node_modules/@angular/common/bundles/common.umd.js",
"node_modules/@angular/common/bundles/common-http.umd.js",
"node_modules/@angular/compiler/bundles/compiler.umd.js",
"node_modules/@angular/elements/bundles/elements.umd.js",
"node_modules/@angular/platform-browser/bundles/platform-browser.umd.js",
"node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js"
]
},
in scripts part[] above, rxjs and @angular js files are included in scripts. But after upgrading to v13, those umd js files are not there anymore in node_modules. Instead, there are mjs files in for example, under fesm2020 or fesm2015.
so, I replaced the above js files with mjs files. and ran the application.
and getting this error and nothing worked
Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
[1] Error: Transform failed with 1 error:
[1] C:/dev/chtmp_frontend/test/projects/chat-showcase/src/app/app.component.scss:17:100: ERROR: Unterminated string token
[1] at C:devchtmp_frontendtestnode_modules@ngtoolswebpacksrcivyloader.js:81:18
[1] at processTicksAndRejections (internal/process/task_queues.js:95:5)
[1]
[1] ./projects/chat-showcase/src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
[1] Error: Transform failed with 1 error:
[1] C:/dev/chtmp_frontend/test/projects/chat-showcase/src/app/app.component.scss:17:100: ERROR: Unterminated string token
[1] at C:devchtmp_frontendtestnode_modules@ngtoolswebpacksrcivyloader.js:81:18
[1] at processTicksAndRejections (internal/process/task_queues.js:95:5)
Could anyone give me some idea how to resolve this?
Thanks in advance
Tried to run the application and make a build