Skip to content

"Cannot find type definition file for 'node'." for 2.4.1 #16772

Closed
@donaldpipowitch

Description

@donaldpipowitch

TypeScript Version: 2.4.1

Code

https://github.com/Mercateo/ws/tree/v2

Diff yarn.lock:

typescript@^2.3.4:
-  version "2.4.0"
-  resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.0.tgz#aef5a8d404beba36ad339abf079ddddfffba86dd"
+  version "2.4.1"
+  resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.1.tgz#c3ccb16ddaa0b2314de031e7e6fee89e5ba346bc"
$ yarn
$ npm run build

Expected behavior:

Compile.

Actual behavior:

ERROR in /Users/foo/Workspace/mercateo-ws/tsconfig.json
error TS2688: Cannot find type definition file for 'node'.

Activity

ghost

ghost commented on Jun 27, 2017

@ghost
andykellr

andykellr commented on Jun 27, 2017

@andykellr

We are having the same problem, but it only seems to surface when running mocha with --require ts-node/register. Rolling back to 2.3.4 and will watch this issue.

sgmccli

sgmccli commented on Jun 27, 2017

@sgmccli

Same issue here with ts-node/register. Fails to find all imported @types modules. I have reverted back to 2.3.4.

JnelsonEmarketer

JnelsonEmarketer commented on Jun 27, 2017

@JnelsonEmarketer

Ditto

johntran

johntran commented on Jun 27, 2017

@johntran

I've been debugging for the past 2.5 hours. Thank you for this issue. I was going insane.

RobARichardson

RobARichardson commented on Jun 28, 2017

@RobARichardson

Having the same issue, but for several other type definition files including angular, angular-material, and more. Had to revert back to 2.3.4.

JasonKleban

JasonKleban commented on Jun 28, 2017

@JasonKleban

I think this is also an issue with ts-loader. 'tsc -p .' works fine but as of this upgrade, webpack with ts-loader involved fails like this:

ts-loader: Using typescript@2.4.1 and C:\Users\Jason\Repos\...\tsconfig.json
Hash: 193ab870329ba77c54cf
Version: webpack 2.5.0
Time: 18597ms
                               Asset     Size  Chunks                    Chunk Names
                              app.js  2.41 MB       0  [emitted]  [big]  main
                          app.js.map  2.88 MB       0  [emitted]         main
...
  [69] ./src/Components/Today/Today.tsx 10.6 kB {0} [built]
...
 [380] ./src/Index.tsx 7.8 kB {0} [built]
    + 368 hidden modules

ERROR in C:\Users\Jason\Repos\...\tsconfig.json
error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Jason\Repos\...\tsconfig.json
error TS2688: Cannot find type definition file for 'qrcode'.

(which is kinda weird because it looks like it built everything successfully before it errors out with this??)

Rolling back to 2.3.4 and the problem is gone.

teppeis

teppeis commented on Jun 28, 2017

@teppeis
lkc0987

lkc0987 commented on Jun 28, 2017

@lkc0987

Having similar issues with type definitions. (node, jquery...)

enforced typescript version 2.4.0 using npm-shrinkwrap as a workaround

build	27-Jun-2017 19:40:29	ERROR in ./src/main/resources/static/js/modules/InfoModule.ts
build	27-Jun-2017 19:40:29	(26,45): error TS2304: Cannot find name 'require'.
build	27-Jun-2017 19:40:29	
build	27-Jun-2017 19:40:29	ERROR in ./src/main/resources/static/js/common/Helper.ts
build	27-Jun-2017 19:40:29	(4,17): error TS2503: Cannot find namespace 'Cookies'.
build	27-Jun-2017 19:40:29	
.....
build	27-Jun-2017 19:40:29	ERROR in /var/......./webapp/tsconfig-prod.json
build	27-Jun-2017 19:40:29	error TS2688: Cannot find type definition file for 'handlebars'.
ldrick

ldrick commented on Jun 28, 2017

@ldrick

Having same issues with all of our type definitions, which are:

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'amcharts'.

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'fs-extra'.

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'handlebars'.

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'highlight.js'.

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'jasmine'.

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'jquery'.

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'lodash'.

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'marked'.

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'minimatch'.

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'node'.

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'shelljs'.

ERROR in [censored]/tsconfig.json
error TS2688: Cannot find type definition file for 'webpack-env'.
dashmug

dashmug commented on Jun 28, 2017

@dashmug

Same problem here.

skseth

skseth commented on Jun 28, 2017

@skseth

I had similar problems with ts-node, but tsc -p was fine. Upgrading to v3.1.0 fixed the problem.

55 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @teppeis@sluukkonen@RobARichardson@skseth@bennycode

        Issue actions

          "Cannot find type definition file for 'node'." for 2.4.1 · Issue #16772 · microsoft/TypeScript