question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npmRebuild is not respected

See original GitHub issue
  • Version: 5.12.1
  • Target: windows ia32

I have several native modules built and in my app’s node_modules, i do not want these rebuilt.

electron-rebuild is also excluding my native module from being packged in the asar because it ‘contains executable code’

how do i prevent that? the module needs to be packed in the asar

my dev package.json looks like

{
  "build": {
    "appId": "com.something.lobby",
    "app-category-type": "com.something.lobby",
    "npmRebuild": "false",
    "win": {
      "target": ["nsis"],
      "icon": "resources/windows/icon.ico",
      "arch": "ia32"
    },
    "nsis": {
      "oneClick": true,
      "installerHeaderIcon": "resources/windows/setup-icon.ico"
    },
    "mac": {
      "icon": "resources/osx/icon.icns"
    },
    "dmg": {
      "icon": "resources/osx/dmg-icon.icns",
      "background": "resources/osx/dmg-background.png"
    }
  },
  "directories": {
    "buildResources": "resources",
    "app": "build"
  },
"devDependencies":{
...
}, "scripts":{
...
}
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
skastr0commented, Sep 5, 2016

I believe that changing "npmRebuild": "false" to "npmRebuild": false should make it work.

Confirmed it working for me.

0reactions
Usnulcommented, Jan 31, 2022

I know this is necro-posting, but I ran into the same issue. I believe it would be beneficial to validate options like these and provide some kind of feedback to the user if the option has an invalid value. Like string instead of a boolean in this case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is difference between 'npm install' and 'npm rebuild'?
json was not respected, so you've got to not only rebuild the binaries, but also make sure that the packages are installed according...
Read more >
Common Configuration - electron-builder
npmRebuild = true Boolean - Whether to rebuild native dependencies before starting to package the app. buildNumber String | “undefined” - The build...
Read more >
node-sass does not support current environment - You.com
run sudo npm rebuild node-sass. Open side panel. Yarn - Node Sass does not yet support my current environment. Asked May 3, 2019...
Read more >
npm - code-server v4.8.0 docs - Coder
This article includes installing instructions based on your operating system. WARNING: Do not use yarn to install code-server. Unlike npm , it does...
Read more >
Node-Red hanging after update - General
the module (for instance, using npm rebuild or npm install ). Not quite sure how you got into this situation, the upgrade should...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found