Git Product home page Git Product logo

Comments (6)

plackowski avatar plackowski commented on July 17, 2024

Same problem here, how to fix it?

from nativescript-schematics.

Bezlepkin avatar Bezlepkin commented on July 17, 2024

Hey! I have same problem! Has anyone solved this problem?

from nativescript-schematics.

Bezlepkin avatar Bezlepkin commented on July 17, 2024

I install npm i @schematics/[email protected] (11.0.1) it's version of Angular in my project.
it worked for me!

from nativescript-schematics.

avif avatar avif commented on July 17, 2024

@Bezlepkin Didn't help..
I tried this:

npm i -D @schematics/[email protected] #(11.0.0) it's version of Angular in my project
npx ng generate component test

Option "entryComponent" is deprecated: Since version 9.0.0 with Ivy, entryComponents is no longer necessary.
Could not find an NgModule. Use the skip-import option to skip importing in NgModule.

And with latest version:

npm i -D @schematics/angular # 11.2.0
npx ng generate component test

An unhandled exception occurred: Cannot find module '@schematics/angular/utility/config'
Require stack:
- /home/test/Projects/native-test/node_modules/@nativescript/schematics/src/angular-project-parser.js
- /home/test/Projects/native-test/node_modules/@nativescript/schematics/src/generate/component/index.js
- /home/test/Projects/native-test/node_modules/@angular-devkit/schematics/tools/export-ref.js
- /home/test/Projects/native-test/node_modules/@angular-devkit/schematics/tools/index.js
- /home/test/Projects/native-test/node_modules/@angular/cli/utilities/json-schema.js
- /home/test/Projects/native-test/node_modules/@angular/cli/models/command-runner.js
- /home/test/Projects/native-test/node_modules/@angular/cli/lib/cli/index.js
- /home/test/Projects/native-test/node_modules/@angular/cli/lib/init.js
- /home/test/Projects/native-test/node_modules/@angular/cli/bin/ng
See "/tmp/ng-xr1RzJ/angular-errors.log" for further details.

from nativescript-schematics.

JamesVal avatar JamesVal commented on July 17, 2024

You have to use angular-cli v10.2.x which has the config.ts that the Nativescript CLI is looking for. This will also mean you will have to install a compatible version of Angular, Typescript, and NodeJS for this all to work. Here's a matrix of version compatibilities:

https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3

Ah for clarity I didn't intend for that to be an actual "fix" since it forces you onto a specific version of Angular, but in case you just needed something to get going.

from nativescript-schematics.

lambourn avatar lambourn commented on July 17, 2024

As @avif mentioned, the location of the getWorkspace was refactored:

I looked at @nativescript/schematics/src/angular-project-parser.js and it seems to fail because of changes upstream that moved getWorkspace from @schematics/angular/utility/config to @schematics/angular/utility/workspace, tried to change that and got this error Cannot read property 'hello-world' of undefined which suggests it didn't find the workspace.

also, getWorkspace is now async so when calling, it has to be awaited.

from nativescript-schematics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.