electron-userland / electron-json-storage

:package: Easily write and read user settings in Electron apps
1.44k stars 80 forks source link

Issue building with webpack #50

Closed johnryan closed 7 years ago

johnryan commented 7 years ago

After adding this dependency i'm seeing an error:

ERROR in ./~/cb2promise/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' /Users/johnryan/Desktop/app/node_modules/cb2promise/lib/cb2promise in /Users/johnryan/Desktop/app/node_modules/cb2promise
 @ ./~/cb2promise/index.js 3:17-55

and

ERROR in ./~/coffee-script/bin/coffee
Module parse failed: /Users/johnryan/Desktop/app/node_modules/coffee-script/bin/coffee Unexpected character '#' (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '#' (1:0)

Is there a recommended solution for this?

Maddoc42 commented 7 years ago

Also interested in a proper fix for this one :+1:

For the meantime I have created a JS version of cb2promise which is written in Coffeescript. The result is available at https://github.com/Maddoc42/cb2promise.

To fix the above error run

npm install --save git+https://github.com/Maddoc42/cb2promise.git

:rocket:

jviotti commented 7 years ago

Can you guys help me understand how this is related to this module? It seems to be a cb2promise/CoffeeScript issue at first sight.

johnryan commented 7 years ago

@jviotti i think you're probably right, i'll close this and open an issue there, i just noticed the issue after adding electron-json-storage so i opened it here.

jviotti commented 7 years ago

Cool, please re-open if you find out a fix can be applied here. I haven't used Webpack, but happy to help if so!

jviotti commented 7 years ago

I got to the bottom of this issue, and solved it on 3.0.4. Check https://github.com/jviotti/electron-json-storage/issues/57