Comments (6)
Same problem here, how to fix it?
from nativescript-schematics.
Hey! I have same problem! Has anyone solved this problem?
from nativescript-schematics.
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.
@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.
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.
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 movedgetWorkspace
from@schematics/angular/utility/config
to@schematics/angular/utility/workspace
, tried to change that and got this errorCannot 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 await
ed.
from nativescript-schematics.
Related Issues (20)
- Generated code-sharing project missing .browserslistrc
- Angular 11 compatibility HOT 9
- How to force a specific version of nativescript
- NS7: Shared files get generated on NS-only projects. HOT 2
- build/app/Package.json file not always created
- Cannot find module '@schematics/angular/utility/config' HOT 8
- Navigate after modal closed is not working properly.
- Support for Angular 12 and EsLint
- Cannot read property 'bundle' of undefined
- User of deprecated Angular elements: "id" and Option entryComponent
- Router Module import mismatch path
- Nativescript Angular code sharing project doesn't build with webpack version 5
- Doesn't seem to work
- Is this project deprecated? HOT 2
- Cannot read property 'kind' of undefined using TypeScript ~4.0.2 HOT 1
- Show your support for NativeScript by sponsoring them.
- ts is not running in browser
- Angular 13+ is not supported HOT 3
- Any alternative for `ng g` ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-schematics.