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.

Error build angular6 with v4.5.1

See original GitHub issue

Hi, i try build my app on angular6 with flatpickr v4.5.1. i get error in console

ERROR in node_modules/flatpickr/dist/l10n/ru.d.ts(57,20): error TS1005: ';' expected.
node_modules/flatpickr/dist/l10n/ru.d.ts(57,21): error TS1003: Identifier expected.
node_modules/flatpickr/dist/l10n/ru.d.ts(57,36): error TS1005: ';' expected.

node -v v10.6.0 npm -v v6.1 “typescript”: “>=2.7.2 and <2.8.0” // need for angular!!!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:15
  • Comments:7

github_iconTop GitHub Comments

3reactions
2f4f4fcommented, Jul 11, 2018

Seems to be a problem with how they’re compiled?

default: import("types/locale").Locale;

v4.5.0 still works:

default: {
        weekdays: {
            shorthand: [string, string, string, string, string, string, string];
            longhand: [string, string, string, string, string, string, string];
        };
        months: {
            shorthand: [string, string, string, string, string, string, string, string, string, string, string, string];
            longhand: [string, string, string, string, string, string, string, string, string, string, string, string];
        };
        daysInMonth: [number, number, number, number, number, number, number, number, number, number, number, number];
        firstDayOfWeek: number;
        ordinal: (nth: number) => string;
        rangeSeparator: string;
        weekAbbreviation: string;
        scrollTitle: string;
        toggleTitle: string;
        amPM: [string, string];
        yearAriaLabel: string;
    };
1reaction
Stolerscommented, Feb 26, 2019

Hello, I’ve got the same issue with Angular 6 and flatpickr 4.5.4: default: import("../types/locale").Locale; throws the compiler error:

ERROR in node_modules/flatpickr/dist/l10n/de.d.ts(62,20): error TS1005: ';' expected.
node_modules/flatpickr/dist/l10n/de.d.ts(62,21): error TS1003: Identifier expected.
node_modules/flatpickr/dist/l10n/de.d.ts(62,39): error TS1005: ';' expected.

The workaround from @czarcismok works, but I would really prefer to not alter with imported code. Is there a clean solution? Maybe a config setting on my side that prevents the syntax with an “inline import”? It seems, others don’t have this problem…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find module "@angular-devkit/build ... - Stack Overflow
After updating to Angular 6.0.1, I get the following error on ng serve : Could not find module "@angular-devkit/build-angular" from ...
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >
Upgrade Angular 5 app to Angular 6 with Visual Studio 2017
Find out how to upgrade Angular 5 app to Angular 6 with Visual Studio 2017. Angular-cli.json is replaced with angular.json in Angular 6....
Read more >
Guide to update your Angular application v8.2 -> v11.0 for ...
Angular now uses your browserslist to determine if an ES5 build is needed. ... read more about new compiler checks and errors that...
Read more >
How to create a logging service in Angular 6 - YouTube
How to create a logging service in angular 6. ... 5.1 K views 4 years ago. 5,153 views • Nov 18, 2018. How...
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