angular-feather
angular-feather copied to clipboard
TypeError: Cannot read property 'kind' of undefined on building an app with the library
First of all, great library. I was using it for a while but recently running ng build --prod
started yielding the following error:
ERROR in ./node_modules/angular-feather/fesm5/angular-feather.js
Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
TypeError: Cannot read property 'kind' of undefined
At first I thought that the problem was with webpack or some Angular dependencies. Unfortunately, it seems like the only solution that currently works for me is removing angular-feather library in order to make the build process work again.
Any ideas why it can be happening and what could be the solutions?
Thanks!
I'm not too sure. What is the version, including prefix, of angular-feather
in package.json?
Can you try reinstalling dependencies with npm install
?
If the issue persists, can you upload it to a repository so I can have a look?
Hello @mmaltsev !
Build works fine. In my case, i solved this problem. Execute these steps, and try build again: (from your project root)
rm -rf node_modules rm -rf package-lock.json npm i npm run build --prod (or your preffered script)
npm run build
will trigger ng build
, which is not building in production mode.
npm run build -- --prod
would be preferable, as it will trigger ng build --prod
, but also will use the ng executable version that is referenced in project's node_modules, not the global one.
@michaelbazos - yes, exactly. By in this case, i think that no one of the command will be works ..
@avmaisak @michaelbazos Thank you guys! I tried to remove package_lock
and reinstall node_modules
but the error persists. Before creating this issue I upgraded the version of the library up to ^6.0.8
, unfortunately, it didn't help either.
I will try to recreate this error in a clean project and update the issue if succeed.
@michaelbazos I resolved the problem by fixing the version of the library at 6.0.4
. It seems like one of your updates in the following versions introduced breaking changes. My suspicion is that it was the one with Angular 8 dependencies. It would be great if you could patch the current version of the portal and create a new minor / major version with breaking changes. Thanks!
@mmaltsev We should close this issue