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.

resolve result is inconsistent with require.resolve if windows virtual drive is used

See original GitHub issue

I’m researching the https://github.com/rollup/rollup/issues/4260 issue and found that the resolve and the require.resolve results differ in windows virtual drive (subst).

To reproduce run the following index.js script:

const resolve = require('resolve');

console.log('require.resolve: ' + require.resolve('./index.js'));
console.log('resolve.sync:    ' + resolve.sync('./index.js', { basedir: __dirname, preserveSymlinks: false }));
resolve('./index.js', { basedir: __dirname, preserveSymlinks: false }, (err, res) => {
    if (err) console.error(err);
    else console.log('resolve:         ' + res);
});

in the following way:

> npm install resolve
> subst X: .
> X:
> node index.js

Output:

require.resolve: X:\index.js
resolve.sync:    C:\repo\index.js
resolve:         C:\repo\index.js

image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ljharbcommented, Jun 17, 2022

v1.22.1 is released.

1reaction
pos777commented, Jun 9, 2022

Hello @ljharb, any updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

rollup does not build on Windows virtual drives #4260 - GitHub
Currently trying to narrow down the underlying issue, and found that plugins/packages/node-resolve fails when calling npm ci : > @rollup/plugin- ...
Read more >
How to Fix Core Isolation Incompatible Driver Issues - YouTube
How to Fix Core Isolation Incompatible Driver IssuesCore Isolation Memory Integrity Fails to Enable Because of Incompatible Driver.
Read more >
Windows 10 upgrade resolution procedures - Microsoft Learn
This issue is resolved in the latest version of Upgrade Assistant. Ensure that "Download and install updates (recommended)" is accepted at the ...
Read more >
Resolved issues in Windows Server 2022 | Microsoft Learn
See a list of known issues that have been resolved for Windows Server 2022 over the last six months. Looking for a specific...
Read more >
Troubleshoot live migration issues - Windows Server
Refresh the virtual machine configuration so that network changes are reflected in cluster, and then try the live migration again. Resolution.
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