ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

Error: Can't resolve './..' #1457

Open DHSchuster opened 4 years ago

DHSchuster commented 4 years ago

I installed the latest version of nativescript, angular, and sidedrawer.

The error shows when I use "tns run android" :

ERROR in ../node_modules/nativescript-ui-sidedrawer/ivy_ngcc__/angular/side-drawer-directives.js Module not found: Error: Can't resolve './..' in 'C:\Users\Cloud\Desktop\Mobile\NativeScript\proyect\conFusion\node_modules\nativescript-ui-sidedrawer__ivy_ngcc\angular' @ ../node_modules/nativescript-ui-sidedrawer/__ivy_ngcc__/angular/side-drawer-directives.js 3:10-25 6:23-38 @ ./app/app.module.ts @ ./main.ts

Mestix commented 4 years ago

I'm facing the same problem after updating from Angular 8 to 10. It's seems like only the sidedrawer keeps giving errors. After removing the plugin everything works fine. When will there be a fix or alternative?

jamescodesthings commented 4 years ago

The build works for me on Angular 10, if you update to 9.0.2 and remove any previous config from ngcc.config.js:

Adequate forewarning: It all looks a bit prerelease.

Roughly:

  1. npm i -E nativescript-ui-sidedrawer@9.0.2 (could also try @rc but it looks like it's behind 9.0.2).
  2. Update any imports of RadSideDrawer, now exported from /angular:
    -import { RadSideDrawerComponent } from "nativescript-ui-sidedrawer/angular/side-drawer-directives";
    +import { RadSideDrawerComponent } from "nativescript-ui-sidedrawer/angular";
  3. Remove the previous entry from ngcc.config.js (if you had one, because this version of the plugin has been compiled w/IVY):
    -    "nativescript-ui-sidedrawer": {
    -      entryPoints: {
    -        "angular": {
    -          override: {
    -            main: "./side-drawer-directives.js",
    -            typings: "./side-drawer-directives.d.ts",
    -          },
    -          ignoreMissingDependencies: true,
    -        }
    -      },
    -      ignorableDeepImportMatchers: [
    -        /tns-core-modules\//,
    -        /@nativescript\/core\//,
    -        /@nativescript\/angular\//
    -      ]
    -    },
Mestix commented 4 years ago

I followed your instructions but it seems like i have to change the references.d.ts file from the nativescript-ui-sidedrawer package my self. Is this expected behaviour?

from:

<reference path="./node_modules/@nativescript/core/global-types.d.ts" />
<reference path="./node_modules/@nativescript/types/ios.d.ts" />
<reference path="./node_modules/@nativescript/types/android.d.ts" />
<reference path="./node_modules/nativescript-ui-core/ios.d.ts" />
<reference path="./node_modules/nativescript-ui-core/android.d.ts" />
<reference path="./android.d.ts" />
<reference path="./ios.d.ts" />

to:

<reference path="../@nativescript/core/global-types.d.ts" />
<reference path="../@nativescript/types/ios.d.ts" />
<reference path="../@nativescript/types/android.d.ts" />
<reference path="../nativescript-ui-core/ios.d.ts" />
<reference path="../nativescript-ui-core/android.d.ts" />
<reference path="./android.d.ts" />
<reference path="./ios.d.ts" />