Skip to content
This repository was archived by the owner on Apr 30, 2019. It is now read-only.
This repository was archived by the owner on Apr 30, 2019. It is now read-only.

tsd includes references to defintion-header.d.ts and immutable.d.ts in generated tsd.d.ts file #274

@rcollette

Description

@rcollette

The problem behavior appears to be that something related to definition-header and immutable npm modules is being referenced in the generated tsd.d.ts.

We were only seeing this behavior on our Jenkins server, but we're not sure why the problem started appearing suddenly.

The console of our Jenkins based build looked like:

+ tsd install

-> running install

>> written 19 files:

    ...
    - toastr/toastr.d.ts
   >> definition-header (node)
   >> immutable (node)
+ gulp ci
[15:58:22] Using gulpfile ~/workspace/build_pb-bower-uam/gulpfile.js
[15:58:22] Starting 'vet'...
[15:58:22] Starting 'emit-errors'...
[15:58:22] Finished 'emit-errors' after 103 μs
[15:58:22] Starting 'sass'...
[15:58:22] Finished 'sass' after 20 ms
[15:58:22] Starting 'typescripts'...
[15:58:22] Starting 'typescript-specs'...
[15:58:22] Starting 'typescripts-min'...
[15:58:22] Starting 'templatecache'...
[15:58:22] Starting 'i18n'...
[15:58:22] Starting 'ts-lint'...
[15:58:25] Finished 'templatecache' after 2.95 s
[15:58:30] Finished 'ts-lint' after 7.96 s
[gulp-typescript] 6053 File '/var/lib/jenkins/workspace/build_pb-bower-uam/node_modules/definition-header/dist/index.d.ts' not found.
> file: /var/lib/jenkins/workspace/build_pb-bower-uam/typings/tsd.d.ts:
> [20] /// <reference path="chai-datetime/chai-datetime.d.ts" />
[gulp-typescript] 6053 File '/var/lib/jenkins/workspace/build_pb-bower-uam/node_modules/immutable/dist/immutable.d.ts' not found.
> file: /var/lib/jenkins/workspace/build_pb-bower-uam/typings/tsd.d.ts:
> [21] 

The key difference here was that at the end of the tsd install you can see the lines prefixed with >>. This was only happening on the server.

After much playing we were able to fix it by running NODE_ENV=production tsd install during the build configuration. It really was sort of dumb luck that we figured it out. NPM has a different behavior with NODE_ENV values so we tried it with tsd and it worked.

The question is, why did this behavior start suddenly and why is it not documented anywhere that I can find.

I realize this version is no longer being maintained but wanted to document the issue and at least the workaround that solved the issue for us.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions