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.

Relativize module paths in generated js/d.ts files

See original GitHub issue

Hi,

I am trying to use standalone BokehJS library with typescript and AngularJS.

I have installed JS library using npm i bokehjs.

and imported in component using import * as Bokeh from "bokehjs"

But after starting application getting multiple errors related to Module not found: Error: Cannot resolve module.

Here are first few lines of log -

ERROR in ./~/bokehjs/build/js/tree/document.js
Module not found: Error: Cannot resolve module 'core/bokeh_events' in
@ ./~/bokehjs/build/js/tree/document.js 7:21-49

ERROR in ./~/bokehjs/build/js/tree/protocol/message.js
Module not found: Error: Cannot resolve module 'core/util/string' in
@ ./~/bokehjs/build/js/tree/protocol/message.js 3:15-42

ERROR in ./~/bokehjs/build/js/tree/models/layouts/layout_dom.js
Module not found: Error: Cannot resolve module 'core/dom' in 
@ ./~/bokehjs/build/js/tree/models/layouts/layout_dom.js 5:12-31 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
paddymulcommented, Mar 21, 2019

I would really like to help on this. I’m looking to play with bokehJS in standalone JS apps, particularly ReactJS. If you could point me to docs on either the compiler transform side or more information (similarly packaged projects, relevant docs) about how to use bokehJS in a standalone project I would appreciate it.

0reactions
mattpapcommented, Jun 15, 2020

It was completed, but recent changes may have caused a regression. Please start a new issue based on your comment. This should be trivial to fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Module Resolution - TypeScript
Use non-relative paths when importing any of your external dependencies. ... That file is implicitly considered that folder's “main” module.
Read more >
How to produce a single *.d.ts or multiple with relative path
creating their own single-file.d.ts file manually; using relative path in their code base so the output d.ts files also contain relative paths.
Read more >
Configuring JSDoc with a configuration file
To customize JSDoc's behavior, you can provide a configuration file to JSDoc ... To enable plugins, add their paths (relative to the JSDoc...
Read more >
Say bye to relative paths in TypeScript | by Vincent Schoener
Edit the file and set your list of paths you want to use. In this example, I just want to have a shortcut...
Read more >
Dependency resolution - Parcel
You can also map a module to a file within your project by using a relative path from the package.json in which the...
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