abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.95k stars 3.45k forks source link

Angular UI compilation issues #10694

Closed lgadola closed 2 years ago

lgadola commented 2 years ago

ABP Version 4.4.4 and 5.0.0.-rc1 User interface: Angular DB: EF core

An unhandled exception occurred: ENOENT: no such file or directory, lstat 'C:\temp\abp\angular\node_modules\@swimlane'les\@swimlane'

created an new application from scratch abp new xxx -u angular --preview

cannot get it to compile due to this error

lgadola commented 2 years ago

I have worked around the swimlane dependency problem by installing it: npm i @swimlane/ngx-datatable but then, next dependency error occurs: npm ERR! Could not resolve dependency: npm ERR! peer @angular/common@">=5.0.0 <11.0.0" from @ngx-validate/core@0.1.1 npm ERR! node_modules/@ngx-validate/core npm ERR! @ngx-validate/core@"*" from the root project

lgadola commented 2 years ago

after installing @ngx-validate/core with --force (because it depends on @angular/common@">=5.0.0 <11.0.0" it compiles and runs, but then throws: Error: inject() must be called from an injection context at injectInjectorOnly (core.mjs:4747) at Module.ɵɵinject (core.mjs:4757) at Object.DocumentDirHandlerService_Factory [as factory] (abp-ng.theme.shared.js:1294) at R3Injector.hydrate (core.js:11457) at R3Injector.get (core.js:11276) at LazyStyleHandler.listenToDirectionChanges (abp-ng.theme.basic.js:456) at new LazyStyleHandler (abp-ng.theme.basic.js:431) at Object.LazyStyleHandler_Factory [as factory] (abp-ng.theme.basic.js:489) at R3Injector.hydrate (core.js:11457) at R3Injector.get (core.js:11276)

this error seems to be related to @swimlane/ngx-datatable in abp-ng.theme

mehmet-erim commented 2 years ago

What's your npm and node version? Can you try installing packages via yarn command?

lgadola commented 2 years ago

thanks, Mehmet It worked using yarn