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.

Not able to use the library as a browser module because of "path" dependency

See original GitHub issue

I am trying to import this library as a module in the browser. There is a require("path") dependency that is preventing it from being used as a browser module. Any solutions to this problem.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dcodeIOcommented, Mar 4, 2021

Last time I checked it worked just fine as an npm module via require("wabt"), but bundling it may require shimming node’s path module apparently. I know that webpack can do this with config options, either stubbing the module out (not sure if that’ll work, depends on what wabt does with it I guess) or providing an alternative implementation that works in the browser.

0reactions
Butterwellcommented, Sep 5, 2021

v1.0.16 works for me, v1.0.17, not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ways to deal with es6 module paths and dependencies
In particular I have 1 library i'd like to split into 3 modules. Let's call the library "salad" and uses "utensils" and "ingredients"....
Read more >
Common TypeScript module problems and how to solve them
Problem 1: Irregular location of dependencies ; node_modules in the ; src directory even though ; node_modules is located outside the ; src ......
Read more >
JavaScript modules - MDN Web Docs
Use of native JavaScript modules is dependent on the import and export statements; these are supported in browsers as shown in the compatibility ......
Read more >
A Guide to Managing Webpack Dependencies - Toptal
The Webpack module bundler processes JavaScript code and all static assets ... Relative paths are not directly related to dependencies, but we use...
Read more >
rollup.js
It is bad practice to mix default and named exports in the same module, though it is allowed by the specification. How bindings...
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