question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Err: cannot find module 'express'

See original GitHub issue

Excuse me, niqdev & other developers,

I have an issue like this, after, execute node dev/server.js

capture

this is my prod.cfg

[url]
url.base=https://www.packtpub.com
url.login=/packt/offers/free-learning
# params: 0=id, 1=format
url.download=/ebook_download/{0}/{1}

#time in seconds
[delay]
delay.requests=2

[credential]
credential.email=mygoogleemail
credential.password=mygooglepassword

[path]
path.ebooks=ebooks
path.extras=ebooks/extras

[drive]
drive.oauth2_scope=https://www.googleapis.com/auth/drive
drive.client_secrets=config/client_secrets.json
drive.auth_token=config/auth_token.json
drive.gmail=mygoogleemail

[notify]
notify.host=smtp.gmail.com
notify.port=587
notify.username=mygoogleemail
notify.password=mygooglepassword
notify.from=FROM@gmail.com
notify.to=mygoogleemail, mysecondgoogleemail

also i want to ask, where should i put my packtpub’s username and password ?

thank you very much for share this crawler, i’m sure it will be great for everyone.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
niqdevcommented, May 21, 2016

Hi, I’m glad you appreciate it, but node dev/server.js is meant for another purpose i.e. only helping in development.

I’ll make it clear for everybody, so if you want to claim and download your free eBook you should

  • clone the repo (https or ssh) git clone https://github.com/niqdev/packtpub-crawler.git
  • create a config file with your own credentials:
cd packtpub-crawler
cp config/prod_example.cfg config/prod.cfg

and at least you should change

[credential]
credential.email=PACKTPUB_EMAIL
credential.password=PACKTPUB_PASSWORD
  • verify that you have installed python and all necessary libraries with pip
  • download your pdf running the following command from the project root directory
python script/spider.py -c config/prod.cfg

I hope this help you!

0reactions
niqdevcommented, Jun 4, 2016

I’m happy about that, finally we did it! Which kind of error do you have? Did you follow all the instructions in the README? If you need help please open another issue regarding the problem. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js, Error: Cannot find module 'express' - Stack Overflow
You have your express module located in a different directory than your project. That is probably the problem since you are ...
Read more >
Error: cannot find module express [SOLVED] - GoLinuxCloud
To solve Error: Cannot find module 'express' error message, you can if the express library is within your node_modules which is available via...
Read more >
Solve - cannot find module 'express' in Node.js - Reactgo
The can't find module express error occurs, if you're trying to access a express module that is not present inside your node_modules folder....
Read more >
Error: Cannot find module 'express' - YouTube
Error : Cannot find module 'express 'Error: Cannot find module 'cors'Error: Cannot find module 'body-parser'Error: Cannot find module ...
Read more >
Solved "error: cannot find module express" in Node.js
While "error: cannot find module express" could come due to many reasons but most of the time it is due to missing node.js...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found