-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Module build failed: TypeError: Path must be a string. Received undefined #246
Comments
plus 1 |
I've done a bit of digging into this. In my case, I was setting the compiler options only though the webpack ts config, and not having any tsconfig.json file present in my project. While using node 5.X, this was working fine; after updating to node 6.X, I started seeing this error. I've isolated the problem to line 156 of index.js: And I suspect the same problem would occur in line 159 if you're using a TS compiler < 1.7: The problem is with path.dirname. In node 5.x, path.dirname(undefined) returns '.', whereas in node 6.x it returns undefined. That's why an exceptions gets thrown in node 6.x if you're using tsloader without a tsconfig.json file. @jbrantly @johnnyreilly Seems like PR #202 is addressing this problem. |
Fixed with 0.9.0 |
This error is given if no tsconfig.json is available... took me hours until I found the blogpost https://www.garysieling.com/blog/fixing-webpack-error-path-must-string-received-undefined
The text was updated successfully, but these errors were encountered: