Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't transpile code residing on network share using node module resolution #12126

Closed
sejrsgaard opened this issue Nov 9, 2016 · 1 comment
Closed
Labels
Duplicate An existing issue was already created

Comments

@sejrsgaard
Copy link

I am experiencing problems when trying to build a TypeScript project which resides on one of our network shares. I am using Windows 7.

The problem only occurs when using node module resolution and seems to be related to the mapping of network drives to UNC paths.

Suppose I have the following setup:

A drive X: mapped to \\server\projects with a folder test containing my files.

TypeScript Version: 2.0.6

Code

// module.ts
export interface A {}

// index.ts
import { A } from './Module'

// tsconfig.json
{
 "compilerOptions": {
  "target": "es2015",
  "module": "commonjs"
 }
}

Expected behavior:
No errors.

Actual behavior:
======== Resolving module './module' from 'X:/test/index.ts'. ========
Module resolution kind is not specified, using 'NodeJs'.
Loading module as file / folder, candidate module location 'X:/test/module'.
File 'X:/test/module.ts' exist - use it as a name resolution result.
Resolving real path for 'X:/test/module.ts', result 'UNC/server/projects/test/module.ts'
======== Module name './module' was successfully resolved to 'UNC/server/projects/test/module.ts''. ========
index.ts (1,24): error TS2307: Cannot find module './Module'.

@mhegazy
Copy link
Contributor

mhegazy commented Nov 9, 2016

Looks like a duplicate of #9552 and #11613. Should be fixed by #12020

@mhegazy mhegazy added the Duplicate An existing issue was already created label Nov 9, 2016
@mhegazy mhegazy closed this as completed Nov 9, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants