-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
--require flag does not load from node_modules #257
Comments
We shouldn't technically be doing |
Found it. Let's use |
Ok, exists all the way back to 4.0, should work well enough if you want to submit a PR. The other reason we can't use |
Nice! I'm collaborating with @Jontem on the |
Looks like this should have been resolved with #258 IIRC. |
As added in #181 ts-node accepts a --require flag. When trying to use this with the tsconfig-paths package it fails to locate the package. Example:
The reason seems to be this line which does
Module._load(id)
in order to require the modules specified by--require
. If it is changed torequire(id)
it will locate the package. It seems likeModule._load(id)
skips loading fromnode_modules
.The
mocha
package also has a-r
option and looking here it seems they userequire
to load the modules rather thanModule._load
. So this example works:The text was updated successfully, but these errors were encountered: