Module version mismatch. Expected 48, got 47.
See original GitHub issueI’m working on a project that often runs hot and cold. As it happens, I haven’t run a build in a little over a month (it’s been a cold period). At the time, it worked just fine. Today, though, I tried to run a build and got this:
Module version mismatch. Expected 48, got 47.
In my project root, I have the following package.json:
{
"name": "status-meter",
"productName": "Status Meter",
"description": "Status Meter is like a fuel gauge for your data allowance.",
"homepage": "http://services.myclient.com/statusmeter",
"repository": {
"type": "git",
"url": "https://bitbucket.org/owner/repo"
},
"dependencies": {
"aws-sdk": "^2.2.15",
"electron-builder": "^2.11.0",
"electron-packager": "^6.0.2",
"electron-prebuilt": "^0.36.0"
},
"scripts": {
"clean": "rm -rf dist",
"clean:osx": "rm -rf dist/osx",
"clean:win": "rm -rf dist/win",
"build": "npm run clean && npm run build:osx && npm run build:win",
"build:osx": "npm run clean:osx && electron-packager ./app \"Status Meter\" --ignore=node_modules/.bin --out=dist/osx/ --platform=darwin --arch=x64 --version=0.36.12 --icon=\"build/assets/osx/Status Meter.icns\" --prune --app-bundle-id=\"com.myclient.statusmeter\" --app-version=$(node -e 'console.log(require(\"./app/package.json\").version)')",
"build:win": "npm run clean:win && electron-packager ./app \"Status Meter\" --ignore=node_modules/.bin --out=dist/win/ --platform=win32 --arch=ia32 --version=0.36.12 --icon=\"build/assets/win/Status Meter.ico\" --prune --app-version=$(node -e 'console.log(require(\"./app/package.json\").version)')",
"pack": "npm run pack:osx && npm run pack:win",
"pack:osx": "npm run build:osx && electron-builder \"dist/osx/Status Meter-darwin-x64/Status Meter.app\" --platform=osx --out=dist/osx/ --config=build/config.json",
"pack:win": "npm run build:win && electron-builder \"dist/win/Status Meter-win32-ia32\" --platform=win --out=dist/win/ --config=build/config.json",
"nightly": "npm run pack && node bin/upload.js"
}
}
I run the build by simply executing
$ npm run nightly
Locally, I’m running Node v6.0.0.
My issue seems similar to #39, but I’m not certain of that. I’ve been looking around for a map of electron version to the packaged node version, but haven’t found one yet. Any advice would be a big help.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Error: Module version mismatch. Expected 48, got 57. · Issue ...
That error message often happens when the node version in a machine has been updated. In your case, it looks like you've installed ......
Read more >Module version mismatch. Expected 48, got 51 - Stack Overflow
It seems the number refers to NODE MODULE version, 48 is node 6, 57 is node 8. We were running our pm2 processes...
Read more >Node Module Version Mismatch - RationalDev
If you get a Module version mistach error in node.js, ... module.js:597 return process.dlopen(module, path. ... Expected 48, got 57.
Read more >2013642 – udevadm warns on a new PCRE2 version: Regex ...
After upgrading pcre2 to 10.38, udevamd warns like this: # udevadm Regex version mismatch, expected: 10.38 2021-10-01 actual: 10.37 ...
Read more >nodegit/nodegit - Gitter
I navigated to the nodegit folder, ran npm install and npm rebuild , but still am getting an Uncaught Error: Module version mismatch....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
node_modules
directory completely (rm -rf node_modules
).sudo
.npm install
.Well,
npm
is not reliable and buggy. So, it is like a windows — if something goes wrong, first step is to reboot machine (i.e. remove cache and old node_modules) 😃