Closed nndevstudio closed 6 years ago
The easiest way to solve this is to mirror install the bridge with npm. See https://github.com/jspm/jspm-cli/issues/1344 for details.
I suspect you could also point typings to index.d.ts
in one of the dist sub-folders.
Thanks for great feedback, but now I have some new errors in both cases.
npm install aurelia-materialize-bridge --save-dev
has resolved "Cannot find module aurelia-materialize-bridge" in .ts files but now there is an compilation error for every bridge module like e.g. Tooltip:
/node_modules/aurelia-materialize-bridge/dist/commonjs/tooltip/tooltip.d.ts
error TS2694: Namespace 'M' has no exported member 'Tooltip'.
Btw npm install aurelia-typed-observable-plugin --save-dev
was requested during compilation so I installed this too.
"aurelia-materialize-bridge": "github:aurelia-ui-toolkits/aurelia-materialize-bridge/dist/commonjs/index.d.ts",
"aurelia-typed-observable-plugin":"github:aurelia-contrib/aurelia-typed-observable-plugin/dist/types/index.d.ts",
In this case I have "only" one error
Error: typings\modules\aurelia-materialize-bridge\index.d.ts(401,15):
error TS2503: Cannot find namespace 'M'.
but for almost every bridge component e.g.
instance: M.Collapsible;
instance: M.Datepicker;
i18n: Partial<M.InternationalizationOptions>;
I would like 2. approach with typings to become a solution :-)
Any clue about M.
?
You need to install materialise typings
On Wed., 29 Aug. 2018, 1:20 am Nemanja Novicic, notifications@github.com wrote:
Thanks for great feedback, but now I have some new errors in both cases.
I tried mirroring: npm install aurelia-materialize-bridge --save-dev has resolved "Cannot find module aurelia-materialize-bridge" in .ts files but now there is an compilation error for every bridge module like e.g. Tooltip:
/node_modules/aurelia-materialize-bridge/dist/commonjs/tooltip/tooltip.d.ts error TS2694: Namespace 'M' has no exported member 'Tooltip'.
Btw npm install aurelia-typed-observable-plugin --save-dev was requested during compilation so I installed this too.
Uninstalled npm mirorring and pointed typings:
"aurelia-materialize-bridge": "github:aurelia-ui-toolkits/aurelia-materialize-bridge/dist/commonjs/index.d.ts", "aurelia-typed-observable-plugin":"github:aurelia-contrib/aurelia-typed-observable-plugin/dist/types/index.d.ts",
In this case I have "only" one error
Error: typings\modules\aurelia-materialize-bridge\index.d.ts(401,15): error TS2503: Cannot find namespace 'M'.
but for almost every bridge component e.g.
instance: M.Collapsible; instance: M.Datepicker; i18n: Partial<M.InternationalizationOptions>;
I would like 2. approach with typings to became a solution :-)
Any clue about M.?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/aurelia-ui-toolkits/aurelia-materialize-bridge/issues/527#issuecomment-416627633, or mute the thread https://github.com/notifications/unsubscribe-auth/ADimvOmf73UKoMnMX6cyCUW509_3uWU8ks5uVV_QgaJpZM4WPP2L .
Or setup typescript to not check lib modules
On Wed., 29 Aug. 2018, 1:20 am Nemanja Novicic, notifications@github.com wrote:
Thanks for great feedback, but now I have some new errors in both cases.
I tried mirroring: npm install aurelia-materialize-bridge --save-dev has resolved "Cannot find module aurelia-materialize-bridge" in .ts files but now there is an compilation error for every bridge module like e.g. Tooltip:
/node_modules/aurelia-materialize-bridge/dist/commonjs/tooltip/tooltip.d.ts error TS2694: Namespace 'M' has no exported member 'Tooltip'.
Btw npm install aurelia-typed-observable-plugin --save-dev was requested during compilation so I installed this too.
Uninstalled npm mirorring and pointed typings:
"aurelia-materialize-bridge": "github:aurelia-ui-toolkits/aurelia-materialize-bridge/dist/commonjs/index.d.ts", "aurelia-typed-observable-plugin":"github:aurelia-contrib/aurelia-typed-observable-plugin/dist/types/index.d.ts",
In this case I have "only" one error
Error: typings\modules\aurelia-materialize-bridge\index.d.ts(401,15): error TS2503: Cannot find namespace 'M'.
but for almost every bridge component e.g.
instance: M.Collapsible; instance: M.Datepicker; i18n: Partial<M.InternationalizationOptions>;
I would like 2. approach with typings to became a solution :-)
Any clue about M.?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/aurelia-ui-toolkits/aurelia-materialize-bridge/issues/527#issuecomment-416627633, or mute the thread https://github.com/notifications/unsubscribe-auth/ADimvOmf73UKoMnMX6cyCUW509_3uWU8ks5uVV_QgaJpZM4WPP2L .
In this moment, а second approach "skipLibCheck": true
seems more convenient because we try to avoid new dependencies when possible.
It works now.
Our project is based on Aurelia TS Skeleton and JSPM. By now we have used in typings.json this line:
"aurelia-materialize-bridge": "github:aurelia-ui-toolkits/aurelia-materialize-bridge/dist/aurelia-materialize-bridge.d.ts",
just like for allaurelia-...
libraries.We are migrating to AMB v1 so, for now, we can use already downloaded version to avoid "Cannot find module aurelia-materialize-bridge" in .ts files
Will
aurelia-materialize-bridge.d.ts
file be generated and where or there is another approach that we should apply considering mentioned settings?