Closed CPolarisAlpha closed 6 years ago
Now when I import nodeHtmlLabel from 'cytoscape-node-html-label';
I get: "File '.../node_modules/cytoscape-node-html-label/dist/cytoscape-node-html-label.d.ts' is not a module."
Now when I
import nodeHtmlLabel from 'cytoscape-node-html-label';
I get: "File '.../node_modules/cytoscape-node-html-label/dist/cytoscape-node-html-label.d.ts' is not a module."
Got a temp fix by creating a postinstall script at package.json
"postinstall": "rm -rf ./node_modules/cytoscape-node-html-label/dist/cytoscape-node-html-label.d.ts"
The type declaration file included in the cytoscape-node-html-label package.json angers Angular 5.
ERROR in node_modules/@types/node/index.d.ts(87,13): error TS2451: Cannot redeclare block-scoped variable 'require'. node_modules/@types/node/index.d.ts(99,13): error TS2451: Cannot redeclare block-scoped variable 'module'. node_modules/cytoscape-node-html-label/dist/cytoscape-node-html-label.d.ts(1,15): error TS2451: Cannot redeclare block-scoped variable 'require'. node_modules/cytoscape-node-html-label/dist/cytoscape-node-html-label.d.ts(2,15): error TS2451: Cannot redeclare block-scoped variable 'module'. node_modules/cytoscape-node-html-label/dist/cytoscape-node-html-label.d.ts(4,15): error TS2451: Cannot redeclare block-scoped variable 'cytoscape'. node_modules/cytoscape-node-html-label/dist/cytoscape-node-html-label.d.ts(16,19): error TS2451: Cannot redeclare block-scoped variable 'cytoscape'.
When I remove the "typings": "./dist/cytoscape-node-html-label.d.ts" from the cytoscape-node-html-label package.json everything works. Would it be possible, at the very least, to give us the options of installing the type declaration file separately instead of including it in the package?
Thanks, -Chris