Closed jacobjohn-transitiv closed 2 years ago
when I remove the keyframe styling, this is the new error, which I can't even find in my app.scss file...
./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[6].rules[1].use[0]!./node_modules/@angular-devkit/build-angular/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[6].rules[1].use[1]!./src/app.scss:61:47 - Error: Module parse failed: Unexpected token (61:47)
File was processed with these loaders:
* ./node_modules/resolve-url-loader/index.js
* ./node_modules/@angular-devkit/build-angular/node_modules/sass-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
| scroll bars
| *********/
> button, input[type=button], input[type=submit] {
| color: hsl(0deg, 0%, 0%);
| background-color: transparent;
edit: Found the styling. It is actually from another scss file that was being imported in app.scss. It appears that any styling will cause this build issue. I'm not quite sure how to fix it.
Not sure what it can be, but I ran into a similar issue going to version 12. Angular is now using a very picky CSS optimizer and simply bypassing it, helped me solve our issue.
optimization
param on both server and client configurations: "optimization": {
"styles": {
"inlineCritical": false
}
},
I can see as well you haven't bumped the version of @angular-devkit/architect
as it's still running 0.900.7
You should probably be running 0.1402.1
If that doesn't work, try deleting node_modules/
folder. Build dependencies from scratch.
If that that doesn't work, remove you npm- or yarn-lockfile and node_modules/
and install dependencies from scratch.
It's always hard (imo) to bump several major versions. A friendly advice that I think works and saves time is making sure you're 1 major version behind Angular. Our project is currently running v13. And I will update to v14 the week before v15 hits. It works relatively smoothly for me. Angular Universal has been particularly cumbersome (imo) to update, as it's not always as straight forward as https://update.angular.io make it look.
Not sure what it can be, but I ran into a similar issue going to version 12. Angular is now using a very picky CSS optimizer and simply bypassing it, helped me solve our issue.
- Try changing the
optimization
param on both server and client configurations:"optimization": { "styles": { "inlineCritical": false } },
- I can see as well you haven't bumped the version of
@angular-devkit/architect
as it's still running0.900.7
You should probably be running0.1402.1
- If that doesn't work, try deleting
node_modules/
folder. Build dependencies from scratch.- If that that doesn't work, remove you npm- or yarn-lockfile and
node_modules/
and install dependencies from scratch.It's always hard (imo) to bump several major versions. A friendly advice that I think works and saves time is making sure you're 1 major version behind Angular. Our project is currently running v13. And I will update to v14 the week before v15 hits. It works relatively smoothly for me. Angular Universal has been particularly cumbersome (imo) to update, as it's not always as straight forward as https://update.angular.io make it look.
Thank you for your response! I completely agree with making sure the application is updated. I was baffled when I saw that our application was version 9, which is why we decided to update it. I finally figured it out for the one's have have this problem!
The error message was not very helpful so I decided to build a new angular 14 app with ng new
and added universal. I compared the new app with my current app and noticed, as you did @peturh, that some of my packages were still outdated. When I updated these packages, including the angular builder and angular-devkit, the error remained but I saw a new error for a loader located in app.ts. I removed the loader since it wasn't required (it appeared to have loaded app.scss on init - don't ask why, the code was there before I joined this project). After removing this line, and the loader, the app finally completed the build.
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.
π Bug report
What modules are related to this issue?
Is this a regression?
Yes, the previous version in which this bug was not present was: 9 ### Description We have decided to update our Angular from 9, step-wise, to 14. after many updates to dependencies, I have been able to transpile the application just fine and run it locally via `ng serve` and even build it via `npm run build`. But when I try to make an ssr build, I'm met with this error after `Server application bundle generation complete.` I'm not quite sure what the issue is here based on the error message. ## π¬ Minimal Reproductionpackage.json
angular.json
app.server.module.ts
π₯ Exception or Error
π Your Environment