Packages required using relative file paths causes issues when using workspaces
See original GitHub issueIf you have conflicting versions of packages in your project for whatever reason, then requiring them ‘relatively’ is dangerous as the file structure might be different.
For example, in connection-fast
at line 15, you have
const { parse, serialize } = require('../../pg-protocol/dist')
This relies on these packages being installed inside the same node_modules
folder, which I believe isn’t a safe assumption
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Having relative paths in .code-workspace files for interpreter ...
The correct solution should be to resolve relative paths in .code-workspace files against the location of the workspace file. 1
Read more >Workspaces do not work nicely with cross-platform builds
Consequently, advise users that the cross-platform files should be cached using relative paths instead of these shortcuts.
Read more >Typescript: Working with Paths, Packages and Yarn Workspaces
The issue with NodeJS projects is that there is no means for the compiled Javascript code to recognise Typescript path aliases. To get...
Read more >open() gives FileNotFoundError/IOError: Errno 2 No such file ...
Most likely, the problem is that you're using a relative file path to open the file, but the current working directory isn't set...
Read more >Using Workspaces to Share Data between Jobs - CircleCI
Files and directories named in the paths: property of persist_to_workspace will be uploaded to the workflow's temporary workspace relative to the directory ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@paprikati good catch - that was hanging out from earlier experiementation…didn’t mean for it to be in the normal require path just yet…either way I have a fix up now!
yah! I gotta figure out how to support the
no-verify
ssl option in a perfectly backwards compatible way - I thought I had but…i very very subtly changed it & that broke the native driver so gonna take another pass at this:https://github.com/brianc/node-postgres/pull/2198
It’s easy to be perfectly backwards compat it just wont look quite as nice…but so it goes. I’ll just need some time to get that updated, work gets hectic in the afternoons so might not have time until tomorrow AM…but release coming soon!