Popper-core: Cannot find name 'Record' in index.d.ts build error

Created on 20 Sep 2017  ·  10Comments  ·  Source: popperjs/popper-core

Steps to reproduce the problem:

  1. Create new VS2015 Update3 MVC Project.
  2. Via NuGet, remove bootstrap 3.0.0.
  3. Via NuGet, attempt install of bootstrap 4.0.0-beta (includes popper.js 1.11.0).
    Get error: Could not install package 'popper.js 1.11.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
  4. Via NuGet, install popper.js 1.12.5.
    Reply yes to "Would you like to search for TypeScript typings in the NuGet package manager".
  5. Via NuGet, install boostrap 4.0.0-beta.
  6. Attempt to re-build VS2015 MVC Project
    Get error "Build: Cannot find name Record" (in index.d.ts).
    Fyi, the index.d.ts comment indicates "Type definitions for popper.js 1.10".

Any other comments?

Does popper.js 1.12.5 have a TypeScript version requirement ?

# QUESTION ❔

Most helpful comment

If it helps anyone, in line with the above comments, I simply had to set my VS2017 project to use the latest version of Typescript as per the link here: https://github.com/Microsoft/TypeScript/wiki/Updating-TypeScript-in-Visual-Studio-2017
Hope it helps!

All 10 comments

I just ran into a similar issue. I don't think typescript definitions exist for 1.11 or 1.12. I downgraded my dependency to 1.10.8

@MrFrankel or @DrewDennison may be able to help?

@goldins happy to help if I can. I'm using 1.11.0 with typescript without any problems and the typings are working great. I haven't used NuGet but I don't think that's the problem.

What's version of typescript are you using? The Record type was added in 2.1 see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-1.html

If you're code is public somewhere,I'll take a look.

You can also probably fix the issue by passing --skipLibCheck (or setting it to 'true in tsconfig.json complier options to avoid any type issues inside your .d.ts files. Let me know if you have any questions.

Ok so it's not a bug, good to know

Currently installed TypeScript version (with VS 2015) is 1.8. So I guess
popper.js has a min TypeScript requirement. I will download and install
latest TypeScript.

On Thu, Sep 21, 2017 at 10:53 AM, Drew Dennison notifications@github.com
wrote:

You can also probably fix the issue by passing --skipLibCheck (or setting
it to 'true in tsconfig.json complier options to avoid any type issues
inside your .d.ts files. Let me know if you have any questions.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/FezVrasta/popper.js/issues/430#issuecomment-331232830,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AefiC3RCXZWhDKjloD8-LAbpP4w4WwMSks5skqKbgaJpZM4PeNUx
.

If it helps anyone, in line with the above comments, I simply had to set my VS2017 project to use the latest version of Typescript as per the link here: https://github.com/Microsoft/TypeScript/wiki/Updating-TypeScript-in-Visual-Studio-2017
Hope it helps!

I'm using Visual Studio 2015 and tried using NuGet to update all from the MVC template with no authentication. We are .Net 4.0 (not 4.5) so that means some updates need to wait. The latest bootstrap required poppers which gave me Build:Cannot find name 'Record' and Build:Cannot find name 'undefined'. I tried the latest bootstrap 4.1.0 and 4.0. So if those things do exist, NuGet isn't getting all that is needed. Finally, I just changed bootstrap back to 3.3.7 and removed poppers. I have downloaded poppers from the site and will see if I can use that version in the references and update bootstrap.

latest version of bootstrap depends on popper.js, downgrading bootstrap if not using its features, this will remove popper and fix issue. Microsoft says cause for this issue is not using latest version of typescript. Upgrading TS also did not resolve for VS2015.

latest version of bootstrap depends on popper.js, downgrading bootstrap if not using its features, this will remove popper and fix issue. Microsoft says cause for this issue is not using latest version of typescript. Upgrading TS also did not resolve for VS2015.

I have this issue too. It's hard to understand why this is still a problem, and why the solution is to use a previous, less secure, version of bootstrap (3.3.7) instead of the current (3.4.1). Surely typescript should be dumped.

Was this page helpful?
0 / 5 - 0 ratings