Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue using with browserify - cannot find module './aes' #133

Closed
Mauredo opened this issue Aug 12, 2016 · 4 comments
Closed

Issue using with browserify - cannot find module './aes' #133

Mauredo opened this issue Aug 12, 2016 · 4 comments

Comments

@Mauredo
Copy link

Mauredo commented Aug 12, 2016

Hi,

Every time I try to use google-spreadsheet, following your tutorial, I always end up with this error:

bundle.js:1 Uncaught Error: Cannot find module './aes'

I've tried to install aes by npm manually and it's not working.

I've tried to check for solutions online and it looks like it's something related to integration with browserify which I also use.

Can you please help?

@theoephraim
Copy link
Owner

I haven't tested integration with browserify at all :(
So actually if you want to hit the spreadsheets API from the browser, you probably want to use the oauth flow to get permissions for a user instead of the service account flow (which is made for server to server communication (the backend of your application).

Very happy to accept a PR if you get it working though!

@theoephraim theoephraim changed the title Cannot find module './aes' Issue using with browserify - cannot find module './aes' Aug 16, 2016
@dariusk
Copy link

dariusk commented Aug 25, 2016

I just ran into this bug myself. It's because this module has node-forge in its dependency tree:

├─┬ google-spreadsheet@2.0.3
│ ├── async@1.5.2
│ ├─┬ google-auth-library@0.9.8
│ │ ├── async@1.4.2  
│ │ ├─┬ gtoken@1.2.1 
│ │ │ ├─┬ google-p12-pem@0.1.0
│ │ │ │ └── node-forge@0.6.42

node-forge doesn't work with browserify and produces this error. It's still an outstanding bug in node-forge: digitalbazaar/forge#294

If I come up with a PR I'll submit, of course.

@dileepkeeppalli
Copy link

@dariusk I was trying to use this node-forge in Ionic 2 application.
cannot find module './aes' this same error I am getting.

Ionic 2 application is in typescript and angular2. The same node-forge I have used in pure angular2 application and it worked fine.

I dont have any idea that why it is it giving this error when I am trying to to use node-forge in Ionic2 applicationn.

Please help me on this

@theoephraim
Copy link
Owner

FYI - I've just a published a new version of this module which is a complete rewrite using Google's V4 Sheets API (v3 is being deprecated on March 3, 2020). YOU MUST MIGRATE IF YOU ARE STILL USING THIS PACKAGE!

Docs available here - https://theoephraim.github.io/node-google-spreadsheet

I do believe this issue should be fixed in the new version.
Please test it out and if you find that there is still a problem, reopen the issue.

Thanks! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants