You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've installed @types/node and ts2 beta (locally and globally)
If I do tsc path/to/file.ts (or node ./node_modules/typescript/bin/tsc path/to/file.ts) it compiles ok, so no need in placing path to node typings in files. But ts-node requires it.
I use ts-node using register hook and can not find typings for node while run. So I have to place: "node_modules/@types/node/index.d.ts" in files of tsconfig.json and then it works.
Is it expected? Why it should it be configured this way?
Hello, Windows 10 64 bit here. Using typescript 2.0.3 and ts-node 1.3.0
I got this working by using the types key under compilerOptions in tsconfig.json
Here is an example tsconfig.json I'm using to run mocha tests via npm with the following script: "mocha --compilers ts:ts-node/register,tsx:ts-node/register \"./src/**/*.spec.ts\""
Activity
blakeembrey commentedon Aug 19, 2016
Can you provide the versions you're using?
wclr commentedon Aug 19, 2016
[email protected]
blakeembrey commentedon Aug 19, 2016
That would be why. You need to update.
blakeembrey commentedon Aug 19, 2016
This is the PR (#150) that should have enabled support. Let me know if that fixes things for you.
blakeembrey commentedon Aug 19, 2016
Here's a related issue also: #153.
wclr commentedon Aug 20, 2016
Seems the issue persist with 1.3.0, in
tsconfigI only haveexclude(or files).blakeembrey commentedon Sep 21, 2016
@whitecolor Are you using Windows? Could be the same issue as #168 - I haven't resolved that yet.
wclr commentedon Sep 21, 2016
Yes i'm using windows, ts-node doesn't lookup typings in
node_modules/@types(the same problem I experience with webpack's ts-loader)blakeembrey commentedon Sep 22, 2016
It works on Unix as far as I know, so it's not that.
jomcode commentedon Sep 22, 2016
Hello, Windows 10 64 bit here. Using typescript 2.0.3 and ts-node 1.3.0
I got this working by using the
typeskey undercompilerOptionsintsconfig.jsonHere is an example tsconfig.json I'm using to run mocha tests via npm with the following script:
"mocha --compilers ts:ts-node/register,tsx:ts-node/register \"./src/**/*.spec.ts\""wclr commentedon Sep 25, 2016
That works.