Coder Social home page Coder Social logo

Comments (13)

leo4444 avatar leo4444 commented on May 10, 2024 37

try this:
npm uninstall cordova-res -g
npm uninstall cordova-res
npm install cordova-res -g

then try:
cordova-res -v
If you see the version of cordova-res everything is fine.
However, it is very likely that you have a problem with the installation of node or npm

then:
ionic cordova platform rm android
ionic cordova platform add android

If the platform is added correctly try:
ionic info

from capacitor-assets.

EmekaTaxGO avatar EmekaTaxGO commented on May 10, 2024 3

@leo4444 Thank you. Worked like a gem.

from capacitor-assets.

ketanambekar1 avatar ketanambekar1 commented on May 10, 2024 1

try this:
npm uninstall cordova-res -g
npm uninstall cordova-res
npm install cordova-res -g

then try:
cordova-res -v
If you see the version of cordova-res everything is fine.
However, it is very likely that you have a problem with the installation of node or npm

then:
ionic cordova platform rm android
ionic cordova platform add android

If the platform is added correctly try:
ionic info

Yes It Worked..! Actually this issue occurred when i updated my nodeJs version from 10.15.3 to 12.14.1 and cordova version from 8.1.2 to 9.0.0... But the res version was same as it was for 8.1.2. Hence uninstalling and installing worked..!! Cheers! :)

from capacitor-assets.

imhoffd avatar imhoffd commented on May 10, 2024

@tuannguyendotme What is the output of which cordova-res ?

from capacitor-assets.

tuannguyendotme avatar tuannguyendotme commented on May 10, 2024

@dwieeb

~
➜ which cordova-res
/usr/local/bin/cordova-res

~

from capacitor-assets.

imhoffd avatar imhoffd commented on May 10, 2024

And if you run cordova-res --version ?

from capacitor-assets.

tuannguyendotme avatar tuannguyendotme commented on May 10, 2024

@dwieeb

~
➜ cordova-res --version

Something went wrong installing the "sharp" module

The module '/usr/local/lib/node_modules/cordova-res/node_modules/sharp/build/Release/sharp.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).

from capacitor-assets.

tuannguyendotme avatar tuannguyendotme commented on May 10, 2024

@dwieeb

I tried "npm rebuild sharp" but it didn't help.

from capacitor-assets.

imhoffd avatar imhoffd commented on May 10, 2024

Just try reinstalling it.

from capacitor-assets.

tuannguyendotme avatar tuannguyendotme commented on May 10, 2024

@dwieeb

I reinstalled it. cordova-res's version bump to 0.6.0 but the problem still remains.

from capacitor-assets.

imhoffd avatar imhoffd commented on May 10, 2024

The NODE_MODULE_VERSION error occurs because the utility was installed for a different Node version. For some reason your npm is installing packages with one Node version and running cordova-res uses another.

I can safely say this isn't a bug with cordova-res. This is a misconfiguration issue on your computer.

from capacitor-assets.

frankleiton avatar frankleiton commented on May 10, 2024

Nice, tanks @leo4444

from capacitor-assets.

MilotH2 avatar MilotH2 commented on May 10, 2024

I lost at least 2 hours with this problem, i tried new version of node, old ones also, and nothing worked. what i did lastly was i installed cordova-res --save-dev so localy, removed the platform, removed node_modules and then i did npm i to install node_modules again, and it worked, this way worked for me. thanks :)

from capacitor-assets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.