Does not do anything
See original GitHub issueI am having a hard time understanding what this really do. Here is my gulp script
// Rebuilds native node modules for Electron.
// More: https://github.com/atom/electron/blob/master/docs/tutorial/using-native-node-modules.md
'use strict';
var path = require('path');
var Q = require('q');
var electron = require('electron-prebuilt');
var electronPackage = require('electron-prebuilt/package.json');
var rebuild = require('electron-rebuild');
const UTILS = require('./utils');
const PATHS = UTILS.PATHS;
var pathToElectronNativeModules = path.join(__dirname, '..', PATHS.APP, 'node_modules');
rebuild.shouldRebuildNativeModules(electron)
.then(function (shouldBuild) {
if (!shouldBuild) {
return true;
}
console.log('Rebuilding native modules for Electron at ', pathToElectronNativeModules, '...');
console.log('installNodeHeaders');
return rebuild.installNodeHeaders(electronPackage.version)
.then(function () {
console.log('rebuildNativeModules');
return rebuild.rebuildNativeModules(electronPackage.version, pathToElectronNativeModules);
}).then(function () {
console.log('preGypFixRun');
return rebuild.preGypFixRun(pathToElectronNativeModules, true , electron);
});
})
.then(function () {
console.log('Rebuilding complete.');
})
.catch(function (err) {
console.error("Rebuilding error!");
console.error(err);
});
Now i have a few native modules, some using node-pre-gyp and some not
Isn’t electron-rebuild
suppose to go into each native module dir and call something like
node-gyp rebuild --target=1.2.0 --arch=x64 --dist-url=https://atom.io/download/atom-shell
or
node-pre-gyp rebuild --target=1.2.0 --arch=x64 --dist-url=https://atom.io/download/atom-shell
For me it does not do anything and simply says
Rebuilding complete.
While my modules are not compiled. I have to do it by hand
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:13 (3 by maintainers)
Top Results From Across the Web
"it does nothing" vs "it doesn't do anything"
Both mean the same but for clarity I'd use "it does nothing" because it is simpler.
Read more >What is the difference between doing nothing and not ... - Quora
“Doing nothing” is a conscious choice; “not doing anything” is a lack of conscious choice to do something. The mind needs rest. The...
Read more >Doesn't do anything for - Idioms by The Free Dictionary
(informal) used to say that something does not make somebody look attractive: That hairstyle doesn't do anything for her. See also: anything, for,...
Read more >“I didn't do nothing” or “I didn't do anything”? Which is correct?
When you have a negative sentence(did not in this case), you need to use “anything”. “Nothing” is a word that you can use...
Read more >to not act or to not do something - synonyms and related words
Synonyms · bother · abstain · neglect · refrain · let nature take its course · make no move · can't bring yourself...
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
Electron will not find the module to recompile it if it was installed as a devDependency.
So:
If you have problems with step 3 visit https://electronjs.org/docs/tutorial/using-native-node-modules and ensure that electron-rebuild is installed.
If it complains about python then run: npm install --global --production windows-build-tools
Thumbs up so others can see.
The new version of
electron-rebuild
should fix these issues.