During "NPM I" facing error: no matching constructor for initialization of 'v8::String::Utf8Value' - npm

I am trying to run npm i, but it gives me the error:
error: no matching constructor for initialization of 'v8::String::Utf8Value'

I got the same problem today when I picked up a project that was working 5 months ago.
The whole game is to keep your dependencies updated in package.json.
The problem happens when there is some version mismatch in your components because something has updated behind the scenes. I suggest you go one by one and start installing latest stable versions of all dependencies. I've just been able to solve the problem with my angular project.
Every time you install a latest version of the dependency, it tells you what else it needs and you go install that. You'll realise that you don't have to install everything and half of it gets updated automatically.

To solve this issue, I just updated the npm version I was using to v10.16.0, then launched the npm install command afterwards; and the error was no more.

Related

Install specific version of tailwind-rn

I just got into mobile development.
I am in the process of following this tutorial "https://www.youtube.com/watch?v=qJaFIGjyRms&t=1384s" to create my first app.
But I have a problem when installing tailwind-rn (at the 23rd minute), I followed everything as in the tutorial but my app tells me that "tw is not a function", after several research I understood that my installation of tailwind was perhaps not the good one and that it is necessary to use tailwind 3.0.1 because it is a stable version and is fonctionnal for this.
My first question is: do you think this is the solution?
My second question: What is the command line to install a specific version of tailwind-rn?
In order to install any package with specific version you can do it in this way:
npm i 'package_name'#'package_version'
In your situation:
npm i tailwind-rn#3.0.1

Enabling IE 11 Angular 12.2 crashing with postcss package issue

I recently upgraded my project from Angular 11 to Angular 12.
Now, I am trying to enable IE 11. Did following:
Did the polyfills.ts file changes
pointed tsconfig.js to es5
removed not from IE 11 entry int .browserslistrc
Now I am not able to ng serve.
It crashes with following error:
Unknown error from PostCSS plugin. Your current PostCSS version is 8.3.6, but
postcss-preset-env uses 7.0.39. Perhaps this is the source of the error below.
I tried following to resolve this:
deleted node_modules, package-lock.json and did npm i several times - didn't work, same issue on ng serve
upgraded npm 6 to npm 7, added .npmrc with legacy-peer-deps=true - didn't work, same issue
used yarn to install the packages - didn't work same issue
added postcss, postcss-preset-env packages directly to depedencies - didn't work, same issue
added postcss, postcss-preset-env packages directly to devDepedencies - didn't work, same issue
I am using node 14.
Only thing that works is if I put the not back in front of IE in .browserslistrc, which was the whole point of doing this exercise.
Does anyone have any clue on how I might solve this?

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 !

Terminal stuck, cannot enter git commands after npm install

I have cloned a GitHub repo and ran npm install as usual (I have it installed globally)
For some reason when I run start, the terminal gets stuck in build, though it did build with parcel (dist folders are created), also I can see the live server page. I can code, I can update.
The problem is that the terminal is stuck on the error message below and I have to start a new terminal every time.
error message on terminal
Building...(node:14216) ExperimentalWarning: Package name self resolution is an experimental feature. This feature could change at any time
/ Building CSSPlugin.js...(node:8680) ExperimentalWarning: Package name self resolution is an experimental feature. This feature
could change at any time
- Building bundle-url.js...(node:14220) ExperimentalWarning: Package name self resolution is an experimental feature. This feature could change at any time
Any idea why I am getting this and how to get rid of it?
Obs.: I have attempted to delete the folder and clone again, the same issue when running npm start for the first time.
Had the same behaviour on Node.js v13.9.0.
After updating Node.js to latest stable version, the warning message is gone and everything works fine.

React Native Build Error for Android after Gradle Upgrade

What went wrong:
A problem occurred configuring project ':app'.
Could not generate a proxy class for class com.android.build.gradle.tasks.BuildArtifactReportTask.
I got the same problem and solved it by update my JDK version from 1.8.0_20 to 1.8.0_171. You may try update your JDK version as well.
This is want I did to followed to fix.
I had already updated java.
But the important thing is to update JAVA_HOME variable which react-native-cli checks when executing its build process. I have had the latest 1.8.0_191 update but still the build failed.
So this is how I solved it. By making sure my react-native-cli refers to latest JDK by means of env variable.
I had your same problem, I had JDK 1.8.05 and upgrade to 1.8.0_172, delete your .gradle folder of the project, and run again react-native run-android.. have fun