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

typeRoots not supported #153

Closed
filipesilva opened this issue Jul 21, 2016 · 4 comments
Closed

typeRoots not supported #153

filipesilva opened this issue Jul 21, 2016 · 4 comments
Labels
question Support requests. We tend not to answer these on Github. Nowadays I convert to Discussion instead.

Comments

@filipesilva
Copy link

Heya, I'm using ts-node with protractor to run some TS tests and wanted to try out the new @types/* repos for typings.

My tsconfig.json has "typeRoots": [ "../node_modules/@types" ] and that seems to work with the local project tsc, but not with ts-node.

Does ts-node at the moment support typeRoots?

@blakeembrey
Copy link
Member

TypeScript 2.0 is still in beta, so it's hard to know. I believe support was probably added with 240d4b9 but if you can confirm that would help.

@blakeembrey blakeembrey added the question Support requests. We tend not to answer these on Github. Nowadays I convert to Discussion instead. label Jul 21, 2016
@filipesilva
Copy link
Author

@blakeembrey just tested and it does work, cheers!

@cristianmtr
Copy link

cristianmtr commented Jan 20, 2017

This doesn't work for me.

Unknown compiler option 'typeroots'. (5023)
    at load (C:\Users\cristianmitroi\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:199:13)
    at service (C:\Users\cristianmitroi\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:363:32)
    at Object.register (C:\Users\cristianmitroi\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:372:5)
    at Object.<anonymous> (C:\Users\cristianmitroi\AppData\Roaming\npm\node_modules\ts-node\src\_bin.ts:148:17)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Function.Module.runMain (module.js:575:10)
  • Windows 7, x64
ts-node --version
ts-node v2.0.0
node v6.2.0
  • tsconfig:
{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "noImplicitAny": false,
        "sourceMap": false,
        "types": [
            // add node as an option
            "node"
        ],
        // typeroots option has been previously configured
        "typeroots": [
            // add path to @types
            "../node_modules/@types"
        ]
    }
}

@blakeembrey
Copy link
Member

Try with a capital R. When in doubt, please try tsc directly to confirm if it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support requests. We tend not to answer these on Github. Nowadays I convert to Discussion instead.
Projects
None yet
Development

No branches or pull requests

3 participants