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

"type is not defined" for type "component" #11

Closed
ffderic opened this issue Apr 14, 2020 · 14 comments
Closed

"type is not defined" for type "component" #11

ffderic opened this issue Apr 14, 2020 · 14 comments

Comments

@ffderic
Copy link

ffderic commented Apr 14, 2020

When trying to use "ng g ngx-spec:spec <some.component.ts>" I just get message "type is not defined" and nothing is generated. It works just fine with services...
Is this a known issue? Any idea?
I use version 2.1.4.

@BrianJVarley
Copy link

Same as @ffderic when I run ngx-spec against a component written in typescript. I get the following..

$ ng g ngx-spec:spec screen-pops-list.component.ts
type is not defined

@saikiranvadlakonda
Copy link

I'm also facing the same error

image

Any idea, how to resolve it.

@buddyackerman
Copy link

buddyackerman commented Jul 27, 2020

Same issue here. Not sure why the most used type is not supported. I'm using NG9.

@lucb-pc
Copy link

lucb-pc commented Sep 1, 2020

I have the exact same problem

@ThatSpaceGuy
Copy link

+1 Same problem - Is anyone working on this?

@ThatSpaceGuy
Copy link

I was able to successfully generate a spec file by running npm i ngx-spec for the project that I wanted to generate the file in. Apparently having it installed globally is not enough - once it was part of the particular project, it generated the desired spec file for a 'component'. Hopefully this helps someone else with the same issues!

@joguarino
Copy link

Same here, the problem is still present, and neither the solution proposed by @ThatSpaceGuy works for me

@kylebradshaw
Copy link

unfortunately I think the project is essentially dead, it's a non-starter at this point.

@smnbbrv
Copy link
Owner

smnbbrv commented Dec 19, 2020

This project is something that was created to solve the particular problem several years ago until Angular team comes with a normal solution. However it looks like they still did not.

There is always an option to make a pull request that fixes the issue or take the project for maintenance. Just complaining does not solve the issue...

@kylebradshaw
Copy link

Agree. Sorry about being so curt. Was working on testing way to late. Thanks for replying to the thread.

@docsa
Copy link

docsa commented Dec 19, 2020

Issue stems from an incompatibility with angular version 9. It can be worked around by installing locally angular-cli@8
Hope this helps

@cacalo
Copy link
Contributor

cacalo commented Jan 15, 2022

This project is something that was created to solve the particular problem several years ago until Angular team comes with a normal solution. However it looks like they still did not.

There is always an option to make a pull request that fixes the issue or take the project for maintenance. Just complaining does not solve the issue...

I fixed the issue and I want to make a pull request. I need permission to upload my branch.
Could you please do that for me?
Thank you!

@smnbbrv
Copy link
Owner

smnbbrv commented Jan 15, 2022

Hi, sounds super!

you can fork the project, make the necessary changes and create a pull request from the fork. This is a normal flow for GitHub projects

@cacalo
Copy link
Contributor

cacalo commented Jan 18, 2022

Fix already merged! This should not longer be an issue :)

@smnbbrv smnbbrv closed this as completed Jan 18, 2022
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