That did not fix it, BUT npm rebuild worked. “Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install).” FIXES: "npm install" and "npm rebuild" Looking back at the error message gave a nice clue: ![]() It looked like we’d need to find an alternate package, but that would have meant a longer diversion from the task at hand. It had been build when Node was back at version 4 (or less). “The Module was compiled against a different Node.js version”Īnother package was 8 years old (yikes!!!) and (worse) did not have a later version. One had a newer version, so we simply updated the latest version in package.json and ran npm install to update. We ran into problems with several packages. No, before advancing run your tests and run you app to verify everything is still functioning OK. Later we can migrate to v14 (skipping v13). V14 has an extra year of lifespan over v12, but was only released last month, so i prefer12 for stability. I could install v13 or v14 (both are current) but v13 is already in maintenance and will reach EOL next month. I am installing node v12 which is Active LTS and has been established for a year at time of writing, and 2 years from End of Life. Next we'll Use “n” to install node (at least version 8 for react)Ĭheck for latest stable releases of Nodejs here: Updating Nodejs via "n" Node Version Manager ![]() Create-react-app wont run on node less than v8, so there as no choice.īelow I'll explain why we updated to v12 (and not v8, v13 or v14). ![]() Then came the time to migrate our front end from Backbone to React. Until then I was relativly happy to remain on an older version. Yes, I know we were running a VERY old version, but our app was functioning without issue, and upgrading was a "nice to have", but not essential.Įventually we'd come to an upgrade (eg of our heroku stack) or of a dependency or new feature that would force us to upgrade. We ran node 4.5.0 for years without ever needing to advance to a more recent version. TLDR This short article deals with installing a later version of nodejs on a linux (ubuntu) Amazon EC2 instance.
0 Comments
Leave a Reply. |