Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'kind' of undefined on building an app with the library #30

Open
mmaltsev opened this issue Dec 9, 2019 · 7 comments

Comments

@mmaltsev
Copy link

mmaltsev commented Dec 9, 2019

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?

@michaelbazos
Copy link
Owner

michaelbazos commented Dec 9, 2019

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?

@avmaisak
Copy link

avmaisak commented Dec 9, 2019

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)

@michaelbazos
Copy link
Owner

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.

@avmaisak
Copy link

avmaisak commented Dec 9, 2019

@michaelbazos - yes, exactly. By in this case, i think that no one of the command will be works ..

@mmaltsev
Copy link
Author

@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.

@mmaltsev
Copy link
Author

@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!

@anikets43
Copy link
Contributor

@mmaltsev We should close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants