ERROR ngx-daterangepicker-material An accessor cannot be declared in an ambient context

前端 未结 7 2518
离开以前
离开以前 2021-02-13 23:58

Can you help me out with this error? this my package.json error I keep getting this error:

ERROR in node_modules/ngx-daterangepicker-material/daterangepicker.component.

7条回答
  •  心在旅途
    2021-02-14 00:24

    For metronic-angular 6.1.8, I spent 8 hours, but I solved.

    • removed package-lock.json
    • removed node_modules folder
    • npm install

    if you execute ng serve received TS1086 error, don't worry...

    now launch:

    • npm i ngx-daterangepicker-material@2.2.0
    • npm i moment@2.18.1

    relaunch `ng serve enjoy! ;)

    the first solution solved the development part, but there are problems during the deployment. The final solution is:

    • removed package-lock.json
    • removed node_modules folder
    • in package.json remove (^) on library ngx-daterangepicker-material ("ngx-daterangepicker-material": "^2.1.11" -> "ngx-daterangepicker-material": "2.1.11")
    • increase version moment from ^2.24.0 to 2.25.3 (remove ^, "moment": "^2.24.0" -> "moment": "2.25.3",

    Now working all... both ng serve and yarn build. ;)

提交回复
热议问题