nrwl

nrwl/nx Workspace-Specific Schematics

ε祈祈猫儿з 提交于 2021-02-07 13:11:00
问题 I've been investigating the nrwl extensions and they look great. However, when I'm following their tutorial for Workspace Specific Schematics, the last step doesn't show me the command to run. Can you tell me how I run the schematic I created? I'm sure it's simple, but I can't find the command anywhere. 回答1: (edit: see Stefan's answer for the correct Nx way to do it. If you want to publish your schematics, you still need to follow this answer) The Nx generator for schematics doesn't do

Using environment variables in nx based nodejs app

混江龙づ霸主 提交于 2020-12-12 02:53:37
问题 I've setup a project with several nodejs and angular apps inside a nrwl/nx workspace. I'm trying to work with the environment files inside the nodejs apps. I've setup the import like this: import {environment} from './environments/environment'; Then I ran ng serve my-node-app and it shows the environment for non production. Now I tried to do ng serve my-node-app --prod to see how the app works with a production setup - but I get the error: Configuration 'production' could not be found in

Could not find an NgModule. Use the skip-import option to skip importing in NgModule

六眼飞鱼酱① 提交于 2019-12-04 15:02:06
问题 I get the error in the subject of this post when I use the CLI to create a new component: ng g c my-component --project=my-project (No component is created) I've seen other posts with the same error message, but none of them also include Nrwl/Nx, which I believe is somehow involved. Project started as Ng4 and was upgraded to Ng6. Any ideas how I can fix this? Thx. TTE Environment: Angular CLI: 6.0.8 Node: 8.9.4 OS: win32 x64 Angular: 6.0.6 @angular-devkit/architect 0.6.8 @angular-devkit/build

Could not find an NgModule. Use the skip-import option to skip importing in NgModule

独自空忆成欢 提交于 2019-12-03 09:25:33
I get the error in the subject of this post when I use the CLI to create a new component: ng g c my-component --project=my-project (No component is created) I've seen other posts with the same error message, but none of them also include Nrwl/Nx, which I believe is somehow involved. Project started as Ng4 and was upgraded to Ng6. Any ideas how I can fix this? Thx. TTE Environment: Angular CLI: 6.0.8 Node: 8.9.4 OS: win32 x64 Angular: 6.0.6 @angular-devkit/architect 0.6.8 @angular-devkit/build-angular 0.6.8 @angular-devkit/build-optimizer 0.6.8 @angular-devkit/core 0.6.8 @angular-devkit