tjanczuk / edge

Run .NET and Node.js code in-process on Windows, MacOS, and Linux
http://tjanczuk.github.io/edge
Other
5.42k stars 641 forks source link

Cannot find module 'C:\native\win32\x64\12.13.0\edge_nativeclr' #715

Closed PrexCoder closed 3 years ago

PrexCoder commented 3 years ago

Hi, I'm getting "Cannot find module 'C:\native\win32\x64\12.13.0\edge_nativeclr' " when I package the application:

// Release "build": "concurrently \"yarn build-main\" \"yarn build-renderer\"" "package": "yarn build && electron-builder build --publish never"

// Dev Mode "start": "cross-env START_HOT=1 node -r @babel/register ./internals/scripts/CheckPortInUse.js && cross-env START_HOT=1 yarn start-renderer-dev",

var libLoader = require('electron-edge-js');

In dev mode works just fine after adding

externals: {
    'electron-edge-js': 'commonjs2 electron-edge-js',
  }, 

into webpack, but when it comes to Release, I get Cannot find module 'C:\native\win32\x64\12.13.0\edge_nativeclr'.

Things that I've tried in order to solve it:

"asar": { "unpackDir": "node_modules/edge-cs/**", etc... }

I've also tried to download native and put it in the same location but I did not had any results, I've been searching a little bit on the issues and stack overflow but I did not found any solution.

PrexCoder commented 3 years ago

Problem solved.