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

experimentalWatchApi is broken in 4.0 #736

Closed
MLoughry opened this issue Mar 2, 2018 · 0 comments
Closed

experimentalWatchApi is broken in 4.0 #736

MLoughry opened this issue Mar 2, 2018 · 0 comments

Comments

@MLoughry
Copy link
Contributor

MLoughry commented Mar 2, 2018

Expected Behaviour

ts-loader executes without crashing while experimentalWatchApi flag is set.

Actual Behaviour

Module build failed: RangeError: The normalization form should be one of NFC, NFD, NFKC, NFKD.
    at String.normalize (<anonymous>)
    at Object.directoryExists (d:\git\project\node_modules\ts-loader\dist\servicesHost.js:112:68)
    at Object.compilerHost.directoryExists (d:\git\project\node_modules\typescript\lib\typescript.js:77404:121)
    at d:\git\project\node_modules\typescript\lib\typescript.js:23409:22
    at Object.forEachAncestorDirectory (d:\git\project\node_modules\typescript\lib\typescript.js:11141:26)
    at getDefaultTypeRoots (d:\git\project\node_modules\typescript\lib\typescript.js:23407:12)
    at getEffectiveTypeRoots (d:\git\project\node_modules\typescript\lib\typescript.js:23393:20)
    at resolveTypeReferenceDirective (d:\git\project\node_modules\typescript\lib\typescript.js:23425:25)
    at resolveNamesWithLocalCache (d:\git\project\node_modules\typescript\lib\typescript.js:76752:38)
    at Object.resolveTypeReferenceDirectives (d:\git\project\node_modules\typescript\lib\typescript.js:76804:20)

Steps to Reproduce the Problem

Enable experimentalWatchApi.

The issue appears to be here, and repeated in the following few lines:

    directoryExists: path => compiler.sys.directoryExists(path.normalize(path)),

The parameter path is colliding with the import path from node.

I just tried turning this flag on as I was headed out of the office, so I'm not sure if there are other issues introduced in 4.0. I'll continue working on it tomorrow and/or next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant