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.

Seems like livereactload is making paths absolute

See original GitHub issue

Suppose that I run this:

browserify a.js -r ./scripts/components/b.js -o c.js

Now a.js can require b.js by calling require('/scripts/components/b.js'). But if I add -p livereactload to the above that require will fail. Reading the compiled code I tried require('/Users/x/y/z/w/scripts/components/b.js') (the absolute path in my filesystem) and it worked. It seems like livereactload is somehow making paths absolute in compiled file. Is it possible to avoid this?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
milankinencommented, Nov 25, 2016

Released 3.1.1 which should fix the source maps bug. However, the original absolute path issue may remain so still keeping this open.

0reactions
EugeneZcommented, Nov 24, 2016

@arcticShadow Check out PR #138 . It might help these problems. If not, please reply in the PR since I think it’s related.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What are the differences between absolute and relative paths?
An absolute path makes no assumptions about your current location in relation to the location of the file or directory it's describing.
Read more >
Make absolute paths relative to the project root in Webpack
I.e. I want to do import foo from '/actions/fooAction' instead. I tried setting Webpack's resolve.root option, but it didn't seem to do anything ......
Read more >
Next.js Tutorial - 59 - Absolute Imports & Module Paths
Courses - https://learn.codevolution.dev/⚡️ Checkout Taskade! https://www.taskade.com/ Support UPI - https://support.codevolution.dev/  ...
Read more >
Path | Node.js v19.3.0 Documentation
The path.resolve() method resolves a sequence of paths or path segments into an absolute path. The given sequence of paths is processed from...
Read more >
What Is a Path? (And Other File System Facts)
An absolute path always contains the root element and the complete directory ... In the following figure, logFile appears to be a regular...
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