Skip to content

Cannot build TypeScript: Cannot find module './built/local/typescript.js' #14368

Description

@kpreisser

TypeScript Version: master (c404666)
Node.js: 6.10.0
OS: Windows 10 (Version 1607)

  • Start cmd in some folder, then run
git clone https://github.com/Microsoft/TypeScript
cd "TypeScript"
npm install -g gulp
npm install
gulp local
  • The build fails with:
[20:39:45] Starting 'built\local\typescriptServices.js'...
[20:39:45] Starting 'built\local\diagnosticMessages.generated.json'...
[20:39:45] Finished 'built\local\diagnosticMessages.generated.json' after 772 μs
[20:39:59] Finished 'built\local\typescriptServices.js' after 14 s
[20:39:59] Starting 'built\local\tsc.js'...
[20:39:59] 'built\local\tsc.js' errored after 653 μs
[20:39:59] Error: Cannot find module './built/local/typescript.js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    (...)

Looking at built\local, there is no .js file:

C:\Users\VPC\Desktop\TypeScript>dir "built\local\*.js"
 Volume in drive C has no label.
 Volume Serial Number is 68CB-2FF1

 Directory of C:\Users\VPC\Desktop\TypeScript\built\local

File Not Found

Instead, they seem to be generated in a built folder located directly in the user's home folder:

C:\Users\VPC\Desktop\TypeScript>dir "%HOMEDRIVE%%HOMEPATH%\built\local\*.js"
 Volume in drive C has no label.
 Volume Serial Number is 68CB-2FF1

 Directory of C:\Users\VPC\built\local

02/28/2017  08:39 PM         4,755,098 typescript.js
02/28/2017  08:39 PM         4,755,098 typescriptServices.js
               2 File(s)      9,510,196 bytes

Metadata

Metadata

Assignees

No one assigned

    Labels

    InfrastructureIssue relates to TypeScript team infrastructure

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions