Comments (8)
You are using a wrong version of the CLI in your package.json. You must use a patched version there.
Could you provide a repro?
from nx.
I've hit it as well, it doesn't matter whether you're generating a new lib or app. Repro steps:
echo '{"packageManager": "yarn"}' >~/.angular-cli.json
yarn global add @angular/cli@next # installs CLI 1.5.0-rc.3
ng new foo-bar
cd foo-bar
yarn add @nrwl/schematics --dev # installs @nrwl/schematics 0.0.7
ng generate workspace app1 --collection=@nrwl/schematics
ng generate app app2
This creates the following directory structure:
apps
├── app1
│ ├── e2e
│ │ ├── app.e2e-spec.ts
│ │ └── app.po.ts
│ └── src
│ ├── app
│ │ ├── app.component.css
│ │ ├── app.component.html
│ │ ├── app.component.spec.ts
│ │ ├── app.component.ts
│ │ └── app.module.ts
│ ├── assets
│ ├── environments
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── favicon.ico
│ ├── index.html
│ ├── main.ts
│ ├── polyfills.ts
│ ├── styles.css
│ └── typings.d.ts
└── app2
├── apps
│ └── app1
│ └── src
│ ├── app
│ │ ├── app.component.css
│ │ ├── app.component.html
│ │ ├── app.component.spec.ts
│ │ ├── app.component.ts
│ │ └── app.module.ts
│ ├── assets
│ │ └── nx-logo.png
│ ├── environments
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── favicon.ico
│ ├── index.html
│ ├── main.ts
│ ├── polyfills.ts
│ └── styles.css
└── e2e
├── app.e2e-spec.ts
└── app.po.ts
from nx.
I had this issue also. I noticed in .angular-cli.json
one of my libraries included path to app1:
"root": "libs\\lib1\\apps\\app1\\src",
After deleting this (I'm not sure when or how it was added)
"root": "libs\\lib1\\src",
generate works normally.
ng g s abc -a lib1 -d
create libs/lib1/src/abc.service.spec.ts (356 bytes)
create libs/lib1/src/abc.service.ts (109 bytes)
from nx.
Can confirm this still happens with Angular 5.0.0
from nx.
I have this issue as well, only happens on existing cli projects that were upgraded to a workspace. Originally created workspaces work fine.
from nx.
The issue is because you are using an unpatched version of the CLI. We point to the patched version of the CLI for this very reason. See here for more info: https://github.com/nrwl/nx/wiki/FAQ
from nx.
For those reading this and trying to figure out, simply modify your @angular/cli devDependencies:
to look like this:
"@angular/cli": "file:.angular_cli.tgz",
The .angular_cli.tgz is generated by upgrading angular cli app to a workspace.
from nx.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
from nx.
Related Issues (20)
- TypeError: isAssetFile is not a function in react-native 0.73.6 version ( nx version 19.0.0) HOT 3
- Bug: Cannot find module 'storybook/internal/common' in v19.6.2 HOT 2
- ENOENT: no such file or directory server-process.json
- EPERM: operation not permitted, open daemon.log
- @nx/vite:build doesn't set NODE_ENV properly
- Playwright project generated with Remix use the wrong start command
- New express workspace has failing e2e tests HOT 1
- @typescript-eslint/parser peer dependency is not updated HOT 1
- Migration to 19.6.2 - Storybook 8 fails
- [Windows] Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it. HOT 5
- Nx Cypress E2E cannot resolve @nx/js library for neither shared commands nor utils.
- nx release - No git tags matching pattern with releaseTagPattern @XXXX/{projectName}/v{version}
- Missing Platform Dependency - v19.4.4 - darwin-x64
- @nx/js:tsc build fails on Windows with Yarn PnP after 19.6.1
- Cypress fails to close
- nx 19.6.3 cannot generate plugins TypeError: Cannot read properties of undefined (reading 'length') HOT 4
- Error "Could not execute command because the task graph has a circular dependency" after upgrading from 19.3.1 to 19.6.3
- Nx graph --print doesn't print anymore
- Error after generating react library in react-standalone example HOT 1
- NX 18 not detecting node 18 HOT 1
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 nx.