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.

problem with dependencies

See original GitHub issue

Short Description: build error when using package

Platform:

  • ubuntu 16.04

node version:

  • v10.1.0 and v8.11.2

npm version:

  • 5.10.0 and 5.6.0

Long descrption After each assembly produces an error:

These dependencies were not found:

* child_process in ./node_modules/shelljs/src/exec.js
* dgram in ./node_modules/native-dns-cache/lookup.js, ./node_modules/native-dns/lib/server.js and 1 other
* fs in ./node_modules/native-dns/lib/platform.js, ./node_modules/node-binance-api/node-binance-api.js and 20 others

To install them, you can run: npm install --save child_process dgram fs

code

const binance = require('node-binance-api');

set dependencies several times, tried different versions of nodejs, also tried to use yarn

thank you

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
xjohnwucommented, Oct 15, 2020

I think the missing dependencies are due to the fact that vue is trying to call node-binance-api library on the browser-end, which doesn’t have node libraries such as fs, dgram etc, because they are typically server-side libraries… The solution is simply trying to keep all the node-binance-api calls only on the server side. I use nuxtjs framework with server api middleware. All node-binance-api calls are made via axios to the server api.

5reactions
jonassunandarcommented, Jul 27, 2019

I think I fixed it by adding

node: {
    fs: "empty",
    dgram: "empty"
  }

to module.exports in ./build/webpack.dev.conf.js .

I should confess, I have no idea why this worked.

June 2019, the problem still occurs and this is the solution. Thanks @pujitm

Read more comments on GitHub >

github_iconTop Results From Across the Web

Defending your code against dependency problems
Problems can occur if your software relies on a specific version of dependent software, and that dependent software is not available on a...
Read more >
What is Dependency Hell and How to Avoid it? - Boldare
Dependency hell (otherwise known as JAR hell, or classpath hell) is a phrase used to describe the difficulties encountered by software ...
Read more >
Solving the World's Open-Source Software Security Problem
The problem is that the open-source software supply chain can introduce unknown, possibly intentional, security weaknesses. One previous ...
Read more >
Solve the problems with dependencies in Java
The problem appears in figure 2 because the libraries use different versions of the same library so Maven/Gradle tries to resolve the conflict ......
Read more >
What dependency hell looks like, and how to avoid it
Everyday dependency issues · The library code might just be terrible! · Many packages are poorly maintained. · Documentation can be poor or...
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