I am currently working on a project using Angular and have just installed version 1.0.5 of ng2-dropdown-treeview. After installation, I restarted my server by running npm start
.
Upon checking the server log, I encountered the following error message:
[PATH]\node_modules\@types\node\index.d.ts:82:13
Subsequent variable declarations must have the same type. Variable 'module' must be of type 'any', but here has type 'NodeModule'.
To resolve this, I went to line 82 in index.d.ts and changed declare var module: NodeModule;
to declare var module: any
as suggested.
However, this change resulted in another error showing up in my devtools console:
Uncaught TypeError: ctorParameters.map is not a function.
This particular issue seems to be pointing towards vendor.bundle.js.35429:
// API of tsickle for lowering decorators to properties on the class.
if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["e" /* isPresent */])(typeOrFunc.ctorParameters)) {
var ctorParameters = typeOrFunc.ctorParameters;
var paramTypes_1 = ctorParameters.map(function (ctorParam /** TODO #9100 */) { return ctorParam && ctorParam.type; });
var paramAnnotations_1 = ctorParameters.map(function (ctorParam /** TODO #9100 */) {
return ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators);
});
return this._zipTypesAndAnnotations(paramTypes_1, paramAnnotations_1);
As someone who prefers not to modify pre-existing code, I thought it best to seek advice from others who might have faced a similar situation. Any assistance would be greatly appreciated!