ngxtension / ngxtension-platform

Utilities for Angular

Home Page:https://ngxtension.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ngxtension] No @angular/core detected

faribauc opened this issue · comments

Hi,

I have an Angular 17.1 running inside an Electron 24. To minimize the package build size, most deps are installed as dev deps, including all angular packages, because they are only required to build the app.

I'm assuming that ngxtension is looking for "@angular/core" under "dependencies" and not "devDependencies".

Is this the case?

Thanks!

Does ngxtension not install? Do you have any errors?

@eneajaho Sorry for the confusion, yes, it installs fine. This happens when I run a generator. When I move the package dependency from "devDependencies" to "dependencies", it works as expected.

I would expect it would check both lists to find whatever it needs to run instead of giving this (technically) false negative.

FYI

If you run the following, it gets installed properly:

npm i ngxtension -D
ng add ngxtension

You'll get a message from ng that it's already installed, but it will configure tsconfig.json and set skipLibCheck as expected.

I'm getting the asme as the user above, even after your proposed solution:

`➜ ct-sbip-v4 git:(develop) ✗ ng add ngxtension

Skipping installation: Package already installed
Initializing ngxtension...
Turning on skipLibCheck...
UPDATE tsconfig.json (980 bytes)
➜ ct-sbip-v4 git:(develop) ✗ ng g ngxtension:convert-signal-inputs

[ngxtension] No @angular/core detected
➜ ct-sbip-v4 git:(develop) ✗ `

i'm running it on angular 17.3.6, I can see the tsconfig and the package.json changes, still no luck running the scripts
I'm running it on the root of my project