cgalvarez / meteor-electron

Meteor Electron, the easiest way to create a desktop Meteor application
MIT License
0 stars 3 forks source link

Confusion over missing modules? #2

Open infowolfe opened 7 years ago

infowolfe commented 7 years ago

The following errors are confusing as hell because I can't see any reference to an ipc-main or original-fs module in meteor or in npm. Any clues?

=> Your application is crashing. Waiting for file change.
=> Modified -- restarting.

Unable to resolve some modules:

  "original-fs" in
/Users/ianbateman/Desktop/Orchard/orchard/meteor-app/packages/electron/app/autoUpdater.js
(web.browser)
  "ipc-main" in
/Users/ianbateman/Desktop/Orchard/orchard/meteor-app/packages/electron/app/proxyWindowEvents.js
(web.browser)

If you notice problems related to these missing modules, consider running:

  meteor npm install --save original-fs ipc-main

Unable to resolve some modules:

  "original-fs" in
/Users/ianbateman/Desktop/Orchard/orchard/meteor-app/packages/electron/app/autoUpdater.js
(os.osx.x86_64)
  "ipc-main" in
/Users/ianbateman/Desktop/Orchard/orchard/meteor-app/packages/electron/app/proxyWindowEvents.js
(os.osx.x86_64)

If you notice problems related to these missing modules, consider running:

  meteor npm install --save original-fs ipc-main

and

Ians-MBP-6:orchard ianbateman$ meteor npm install --save original-fs ipc-main
npm ERR! Darwin 16.4.0
npm ERR! argv "/Users/ianbateman/.meteor/packages/meteor-tool/.1.4.3_2.1bvf0xf++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node" "/Users/ianbateman/.meteor/packages/meteor-tool/.1.4.3_2.1bvf0xf++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm" "install" "--save" "original-fs" "ipc-main"
npm ERR! node v4.8.0
npm ERR! npm  v4.3.0
npm ERR! code E404

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/original-fs
npm ERR! 404
npm ERR! 404  'original-fs' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/ianbateman/.meteor/packages/meteor-tool/.1.4.3_2.1bvf0xf++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/.npm/_logs/2017-03-20T19_59_51_791Z-debug.log
cgalvarez commented 7 years ago

Hi, @infowolfe

The dependency original-fs is used and imported here. The only two methods that seems to be used in that entire file are fs.writeFile() and fs.unlink(). I think it would work replacing that line with const fs = require('fs') (the core fs package of Node.js implements those two methods) or using the package fs-extra (but note that you should change package.js/package.json accordingly if you choose this way).

The ipc-main is part of electron, and it is used and imported here. Maybe changing that import to const {ipc} = require('electron') as indicated in its docs may fix the issue.

Hope this notes help you to solve the issue.

infowolfe commented 7 years ago

Sounds great, I'll submit a PR to upstream later today.