question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find namespace 'NodeJS'.

See original GitHub issue

I just updated my project to Typescript 2.0 and Typedoc@latest, and I get this error thrown from Typedoc.

 Cannot find namespace 'NodeJS'.

I had to change a type from number to NodeJS.Timer, because of a change in the type definition for setTimeout in Node type definitions.

Any idea how I can fix this issue?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

27reactions
Fzumcommented, May 13, 2017

If you also have tsconfig.app.json in your working directory, try to add the attribute node to the types field. Like: { "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", "module": "es6", "baseUrl": "", "types": ["node"] --> ADD THIS }, "exclude": [ "test.ts", "**/*.spec.ts" ] }

This was working for me…

1reaction
Murilo-Perronecommented, Feb 3, 2018

For me "types": ["node"] didn’t work, but it worked by adding this directive:

{
  "compilerOptions":
  {
    ...
    "typeRoots": [
      "node_modules/@types"
    ]
  }
}

PS: I’m in an ionic 3 project running on Windows.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find namespace NodeJS after webpack upgrade
8 to v2, and everything seems to be working fine. The only problem is that the old code has the following: import Timer...
Read more >
Fix Cannot Find Namespace NodeJS - Unbiased Coder
The problem is that every NodeJS project that uses tsconfig requires a configuration file. This needs to have a file importing or using...
Read more >
Cannot find namespace 'NodeJS'. · Issue #1642 - GitHub
For anyone landing here from trying Heroku, I found that a solution to this was to move my "@types/*" declarations from the devDependencies...
Read more >
Cannot find namespace 'NodeJS' also with types node ...
While upgrade angular 8 to 13 i am facing same. Because zone.js not installed to my project. so install zone js the problem...
Read more >
Cannot find namespace NodeJS after webpack upgrade
I have Angular2 application that is built with WebPack. I upgraded WebPack from v1.8 to v2, and everything seems to be working fine....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found