8.0 not compiling
Polyterative opened this issue · 1 comments
Describe the bug
I am unable to compile my project with the 8.0.0 library.
Also can't install without npm i --force
./node_modules/@swimlane/ngx-graph/fesm2015/swimlane-ngx-graph.mjs:14:0-40 - Error: Module not found: Error: Can't resolve 'd3-scale' in '[myProj]\node_modules\@swimlane\ngx-graph\fesm2015'
To Reproduce
Use angular 13.
ngx-graph version
8.0
Additional context
Package.json:
"dependencies": {
"@angular/animations": "^13.1.1",
"@angular/cdk": "^13.1.1",
"@angular/cdk-experimental": "^13.1.1",
"@angular/common": "^13.1.1",
"@angular/compiler": "^13.1.1",
"@angular/core": "^13.1.1",
"@angular/fire": "6.1.5",
"@angular/flex-layout": "^13.0.0-beta.36",
"@angular/forms": "^13.1.1",
"@angular/material": "^13.1.1",
"@angular/platform-browser": "^13.1.1",
"@angular/platform-browser-dynamic": "^13.1.1",
"@angular/router": "^13.1.1",
"@ngx-pwa/local-storage": "^12.1.0",
"@sentry/angular": "^6.16.1",
"@sentry/tracing": "^6.16.1",
"@supabase/supabase-js": "^1.29.1",
"@swimlane/ngx-graph": "^8.0.0",
"angular-html-parser": "^1.8.0",
"ngx-lottie": "^8.0.1",
"lottie-web": "^5.8.1",
"core-js": "^3.17.3",
"firebase": "^8.10.0",
"luxon": "^2.2.0",
"luxon-angular": "^5.0.0",
"ngx-timeago": "^2.0.0",
"rxjs": "^7.4.0",
"tslib": "^2.3.1",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^13.1.2",
"@angular/cli": "^13.1.2",
"@angular/compiler-cli": "^13.1.1",
"@angular/language-service": "^13.1.1",
"@types/jasmine": "^3.9.0",
"@types/jasminewd2": "^2.0.10",
"@types/luxon": "^2.0.8",
"@types/node": "^17.0.5",
"angular-build-info": "^2.0.1",
"codelyzer": "^6.0.2",
"jasmine-core": "^3.10.1",
"jasmine-spec-reporter": "^7.0.0",
"karma": "^6.3.9",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^4.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"protractor": "^7.0.0",
"standard-version": "^9.3.2",
"ts-node": "^10.4.0",
"typescript": "4.5.4"
}
}
Hey, I had the same problem in a project after updating my dependencies.
For me, it was sufficient to add d3-scale to my project's dependencies (i.e., run npm install d3-scale --save
).
This is also suggested in this stackoverflow post.
Unfortunately, I do not know why this is necessary and also do not know why it isn't a dependency of ngx-graph itself already.