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

Add request library in dependencies list #48

Merged
merged 2 commits into from
Feb 26, 2020

Conversation

joaobarbosa
Copy link
Contributor

Add request as a direct dependency again, as it's required in the AbstractToJson file, avoiding MODULE NOT FOUND errors.

Example:

// before:
// $ npm install tabletojson
// `requests` was not installed

const tabletojson = require('tabletojson');

// some code...

results in:

internal/modules/cjs/loader.js:983
  throw err;
  ^

Error: Cannot find module 'request'
Require stack:
- /path/to/project/node_modules/tabletojson/lib/AbstractToJson.js
- /path/to/project/node_modules/tabletojson/lib/tabletojson.js
- /path/to/project/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
    at Function.Module._load (internal/modules/cjs/loader.js:862:27)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/path/to/project/node_modules/tabletojson/lib/AbstractToJson.js:3:17)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/path/to/project/node_modules/tabletojson/lib/tabletojson.js:3:24)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/path/to/project/node_modules/tabletojson/lib/AbstractToJson.js',
    '/path/to/project/node_modules/tabletojson/lib/tabletojson.js',
    '/path/to/project/index.js'
  ]

@coveralls
Copy link

coveralls commented Feb 26, 2020

Pull Request Test Coverage Report for Build 69

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.462%

Totals Coverage Status
Change from base Build 68: 0.0%
Covered Lines: 105
Relevant Lines: 105

💛 - Coveralls

@maugenst
Copy link
Owner

Perfect ... solves this error ...

Nonetheless I think I'm going to replace it by some other request replacement. But thanks anyway!!!

@maugenst maugenst merged commit 316ba79 into maugenst:master Feb 26, 2020
@joaobarbosa
Copy link
Contributor Author

Nonetheless I think I'm going to replace it by some other request replacement. But thanks anyway!!!

I thought about it since request is not going to being actively developed anymore, but decided to leave the replacement decision to you, @maugenst 👍

@joaobarbosa
Copy link
Contributor Author

@maugenst I forgot to update the package-lock with the current version (1.2.1) 🤦‍♂ Could you do that or do you want me to open another PR?

@maugenst
Copy link
Owner

maugenst commented Mar 6, 2020

@joaobarbosa ... I recently published a new version which is a total rewrite in ts. This also includes the usage of got instead of request. Please have a look on it and feel free to send me some remarks or suggestions.

BR :-)

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

Successfully merging this pull request may close these issues.

None yet

3 participants