OOTB Spartacus SASS build is failing - spartacus-storefront

I'm having this issue below just today. would you know how to fix this? This is the SASS version installed in my Spartacus
sass "1.22.9"
sass-loader "7.2.0"
I'm using Angular8 and Spartacus 1.5

Able to build successfully in CCV2. I added the below code in my package.json and make sure to remove the package-lock.json or yarn.lock before doing yarn install.
"resolutions": {
"hamburgers": "~1.1.3"
}
It seems the SAP Spartacus SASS version is still in 1.22.9. However, the latest version of hamburgers requires at least a 1.33 sass version.
This is a workaround fix while waiting for the SAP Spartacus to fix this issue. Reference ticket: https://github.com/SAP/spartacus/issues/15389

Related

Vercel Deployment: Internal Server Error when updating NPM Packages

I'm currently working on a NUXT 2.x App and I'm hosting the dev Project on Vercel. Now since the NPM packages are outdated and I want to remove some of the packages, the Deployed Version on Vercel throws an empty page with 500 error. If i stash the changes in package.json, everything works fine on the deployed version.
How can I update / remove NPM packages from my current Version and deploy it on Vercel?
Apparently, I had to downgrade the Firebase Version from 9.5 to 9.1, then it deployed just fine on Vercel.
I do recommend the usage of yarn upgrade-interactive --latest to get a list of all the package and the possible updates.
If you want to remove a specific one, go for yarn remove my-not-so-cool-package.
Think about bumping your Node.js version to 14 and try to build locally before pushing to Vercel.
Then, it comes down to reading out the differences that you may have between the versions of the packages and fix the breaking changes if any.
Can't help more without more info from your part.

How to downgrade Gatsby version from 3.14.2 to ^2.0.0

I have a Gatsby starter (taylorbryant/gatsby-starter-tailwind) that uses gatsby-plugin-postcss which is not compatible with the version of gatsby installed in my machine like a few other plugins used in the starter. You can see the warning I get when trying to build for production.
warn Plugin gatsby-plugin-postcss is not compatible with your gatsby version 3.14.2 - It requires gatsby#^2.0.0
How can I downgrade Gatsby to a specific version, maybe just locally?
This isn't too difficult.
Open your package.json file and change the actual version you want to use.
Then run npm update to make sure you update all the packages to the right version.
Please correct me if I'm wrong but I believe that is the way to change the Gatsby version.
Please do keep in mind that this is most probably cause a bunch of other discrepancies with other packages that actually require a higher version in order to work.
You can find more information about how different versions work here: https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v2-to-v3/
Best of luck!

Vue packages version mismatch on Nuxt.js

I'm trying to upgrade from Vue 2 version to vue 3, my project has Nuxt.js framework.
I put this command to upgrade : vue add vue-next, and upgrade has been successful. but when I try to execute project appear the next error :
Vue packages version mismatch:
- vue#3.0.7
- vue-server-renderer#2.6.12
This may cause things to work incorrectly. Make sure to use the same version for both.
I don't know how to resolve this problem.
That problem happened to me after an update. This is what worked for me.
delete the project's node_modules folder
delete the package-lock.json file
npm i
Solution found here https://github.com/nuxt/nuxt.js/issues/6823
see post from "daniplaninc"
The problem you are mentioning here comes from the fact that Nuxt 3 hasn't been released yet : it still doesn't support Vue 3, hence your application won't compile with vue 3...
The release is planned for Midsummer 2022 : https://v3.nuxtjs.org/community/roadmap/
I am waiting for this version too so I hope it will be released soon !

force node-sass to use lib-sass 3.6.0

I am using node-sass 4.13.1 which wraps libsass 3.5.4.
Due to security reasons we need to update libsass to 3.6.0 without downgrading the node-sass version.
How can this be achieved. Specifying the libsass version in the package.json is not feasible since libsass is not a dependency but rather a wrapped library.
Is it possible to force the use of libsass 3.6.0 after all dependencies for the repo have been installed?
Does anybody know a better solution?
I am leaning towards looking into how i can edit the scripts part of the package.json file to run a pre-install script which will force the version. Is that a good idea?
Thanks
There are forked versions of node-sass that do have 3.6.x in them, as well as a branch within the main project repo. The problem is that you will have to build it yourself in order to use them.
https://github.com/ItsLeeOwen/node-sass/tree/libsass-2b8a17a
or
https://github.com/sass/node-sass/tree/libsass-3.6.1
for example.
There is a branch available in node-sass repository which uses LibSass v3.6.3 with node-sass v4.13.1
I also faced the same issue and after doing a lot of research, the below solution worked for me:
Try installing the branch of node-sass from the github repository by using the below command (the package is already built, so you don't have to build it explicitly)
npm install https://github.com/sass/node-sass.git#v5

can't resolve app.module.ngfactory when using yarn webpack:prod

In my application, the front-end and back-end are separated, get this issue when I issue:
yarn webpack:prod
to generate a front-end package for production. however:
yarn start
works fine.
Note:
angular version is 5.1.0
jhipter version is 4.14.3
yarn version is 1.3.2
Very appreciated for any suggestion and help.
upgrade seems too complex, so I regenerate a new jhipster project, the angular 5.1 is upgraded to 5.2. then copy my source code to the new project.
Because #angular/http is updated to #angular/common/http, I did a lot of code change manually, and finally get it worked.