inxilpro / node-app-root-path

Determine the root path to your project
MIT License
604 stars 29 forks source link

Update resolve.js #15

Closed hannes-dahlberg closed 8 years ago

hannes-dahlberg commented 8 years ago

Method of requiring has changed in electron since version 1.0. This change fixs the "Uncaught Error: Cannot find module 'remote'" error when trying to use "var appRoot = require('app-root-path');" on render side of an Electron app.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 93.478% when pulling d923200908d431c2004480016685730e80504f98 on hannes-dahlberg:patch-1 into 4894c8c2b64d2dd32729541633bed90e64f6c67f on inxilpro:master.

haltcase commented 8 years ago

Nice fix - I'm currently using it and can confirm it solves the issue.

Until this is merged if anyone needs the fix you can remove the original and add this to your package.json dependencies:

"app-root-path": "hannes-dahlberg/node-app-root-path#patch-1"

Then npm install and you'll get your fix. Just be aware this depends on the git repo and if it's removed ( like it probably will after it gets merged ) then it'll break.

inxilpro commented 8 years ago

Sorry, for some reason didn't notice this before. Taking a look!