Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My build fail since yesterday with an error message from preact #3920

Closed
borisBelloc opened this issue Feb 28, 2023 · 2 comments
Closed

My build fail since yesterday with an error message from preact #3920

borisBelloc opened this issue Feb 28, 2023 · 2 comments

Comments

@borisBelloc
Copy link

borisBelloc commented Feb 28, 2023

hello 👋

Describe the bug

  • I have an angular aplication.
  • Everything worked fine before and I didn't upgrade any package.

Since yesterday (27 february), my ng build --prod fail with an error message from Preact :

Compiling ngx-cookie-service : es2015 as esm2015
Compiling @ngx-translate/http-loader : es2015 as esm2015
ERROR in node_modules/preact/src/jsx.d.ts:2138:24 - error TS2304: Cannot find name 'SVGMPathElement'.
2138      mpath: SVGAttributes<SVGMPathElement>;
                               ~~~~~~~~~~~~~~~
node_modules/preact/src/jsx.d.ts:2145:22 - error TS2304: Cannot find name 'SVGSetElement'.
2145      set: SVGAttributes<SVGSetElement>;
                             ~~~~~~~~~~~~~
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! optical-si-frontend@2.36.0 build:production: `ng build --prod`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the optical-si-frontend@2.36.0 build:production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/.npm/_logs/2023-02-27T08_55_57_275Z-debug.log
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

image

I found one framework using PREACT in my packagelock.json (I don't have PREACT in package.json) :

    "@fullcalendar/core": {
      "version": "5.11.4",
      "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-5.11.4.tgz",
      "integrity": "sha512-p1/GRIageomlyJpsMVi+Ig5TNo9t2sEYsLHe6zvtCLtpXK/l03veZukYyM/jou8VzT0VJp1f7yN8irc5VBgqxw==",
      "requires": {
        "@fullcalendar/common": "~5.11.4",
        "preact": "^10.0.5",
        "tslib": "^2.1.0"
      }
    },

at the bottom of packagelock.json, I have :

    "preact": {
      "version": "10.13.0",
      "resolved": "https://registry.npmjs.org/preact/-/preact-10.13.0.tgz",
      "integrity": "sha512-ERdIdUpR6doqdaSIh80hvzebHB7O6JxycOhyzAeLEchqOq/4yueslQbfnPwXaNhAYacFTyCclhwkEbOumT0tHw=="
    },

If I change PREACT version at the bottom of the file from 10.13.0 to 10.8.2 it fix the problem.

Any idea what can I do ?

I'm not sure if I should report thig bug to PREACT or FULLCALENDAR.
Issue from fullcalendar github : fullcalendar/fullcalendar#7228

Thank you.

@borisBelloc borisBelloc changed the title My build fail since yesterday, error message with preact My build fail since yesterday, error message from preact Feb 28, 2023
@borisBelloc borisBelloc changed the title My build fail since yesterday, error message from preact My build fail since yesterday with an error message from preact Feb 28, 2023
@IamZiaullah
Copy link

IamZiaullah commented Feb 28, 2023

if you lock your preact version manually in package.json like "preact": "10.0.5 - 10.12.1", it solves the issue for the project which are using TypeScript v < 4.4 and @fullcalendar v5. but if you don't want to preact manually to your package.json try adding the flag "skipLibCheck": true to compilerOption object in tsconfig.json

@rschristian
Copy link
Member

See fullcalendar/fullcalendar#7225

Preact (as of v10.13.0) is shipping TypeScript v4.4 features. This is an issue for the FullCalendar repo, as the types are correct from our side.

@rschristian rschristian closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants