Giter Club home page Giter Club logo

stefanoslig / angular-ngrx-nx-realworld-example-app Goto Github PK

View Code? Open in Web Editor NEW
845.0 845.0 257.0 26.19 MB

Real world application built with Angular 18, NgRx 18, nrwl/nx 18

Home Page: https://angular-ngrx-nx.netlify.app/

License: MIT License

TypeScript 79.94% HTML 15.86% CSS 0.30% JavaScript 0.97% SCSS 0.08% Gherkin 2.85%
angular angular18 component-store ngrx ngrx-effects ngrx-signals-store ngrx-store nrwl nrwl-nx nx nx-workspace realworld-angular standalone-components

angular-ngrx-nx-realworld-example-app's Introduction

Hi, I'm Stefanos ๐Ÿ‘‹

Follow me on Twitter Follow me on GitHub Linkedin network

angular-ngrx-nx-realworld-example-app's People

Contributors

andrzejpindor avatar angular-cli avatar chulphan avatar colesanders avatar danielsofomo avatar dependabot[bot] avatar juristr avatar mathisvester avatar mfp22 avatar renovate[bot] avatar stefanoslig avatar stephanmullernl avatar tamara-dimeska avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-ngrx-nx-realworld-example-app's Issues

multiple forms

Is it possible to have multiple dynamic-forms on the same page (component). It forms structure seems to get overridden by the latter form.

Replace placeholder in email login input

The placeholder of the email input shows: "Username". It suggests that the user can put in username. It would be better to replace it with "Email" because authentication with username is not supported.

Jest tests fail

I'm trying to run unit tests in this repository but they fail with some jest errors I can't solve. Reproduction steps:

git clone https://github.com/stefanoslig/angular-ngrx-nx-realworld-example-app.git ./
npm install
npm install -g nx
nx run-many --target=test --all

The result of running the tests is the following error:

 โ— Test suite failed to run

TypeError: Cannot read properties of undefined (reading 'html')

  at new JSDOMEnvironment (../../../node_modules/jest-environment-jsdom/build/index.js:72:44)
  at async TestScheduler.scheduleTests (../../../node_modules/@jest/core/build/TestScheduler.js:317:13)
  at async runJest (../../../node_modules/@jest/core/build/runJest.js:407:19)
  at async _run10000 (../../../node_modules/@jest/core/build/cli/index.js:339:7)
  at async runCLI (../../../node_modules/@jest/core/build/cli/index.js:190:3)`

After some googling I fixed this with running this command:

npm install --save-dev jest-environment-jsdom

But then I get errors like this:

โ— Test suite failed to run
                                                                                                                                
Jest encountered an unexpected token                                                                                            
                                                                                                                                
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.                                                                                        
                                                                                                                                
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. 

By default "node_modules" folder is ignored by transformers.

Here's what you can do:
 โ€ข If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
 โ€ข If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
 โ€ข To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.    
 โ€ข If you need a custom transformation specify a "transform" option in your config.
 โ€ข If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/configuration
For information about custom transformations, see:
https://jestjs.io/docs/code-transformation

Details:

C:\Users\redzi\Documents\repos\angular-ngrx-nx-realworld-example-app-main\node_modules\rxjs\dist\esm5\index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export { Observable } from './internal/Observable';
                                                                                  ^^^^^^

SyntaxError: Unexpected token 'export'

  at Runtime.createScriptFromCode (../../node_modules/jest-runner/node_modules/jest-runtime/build/index.js:1796:14)
  at Object.<anonymous> (../../node_modules/@angular/core/fesm2020/core.mjs:7:69)

FAIL   conduit  apps/conduit/src/app/layout/footer/footer.component.spec.ts`

I presume it's an issue with something I'm doing or my setup since I've noticed CI/CD pipelines configured which would report this issue, but I've tried it on two PCs with the same results. What am I doing wrong?

Article follow/unfollow duplicated effects

I noticed that articlesActions.favorite and articlesActions.unfavorite have effects in:

For this reason when user follows there steps:

  1. enter products list (articles-list feature store is loaded)
  2. enter product page (article feature store is loaded)
  3. clicks favorite button on article details page
  4. both effects from both feature stores are fired, causing duplicated request for backend

Is it intended behavior? What would be the best clean solution to deal with this situation if we need to get rid off this duplicated request?

Question about the architecture

Hi Stefano...
I am debugging your app for learning purposes. Thumbs up, I think it's very well coded.
I have a question regarding your architecture choices:

Why are you creating an ArticleGuardService to only dispatch this.facade.loadArticle - why are you not just calling loadArticle and loadComments in ngOnInit of the article.component ?

Thanks!

Migrate home lib to ngrx v8

Based on what I have done for the other libraries, I want to use the new features of NgRx in this lib as well

Suggestion: consider adding a second app

Thank you for your time creating this repo!

I suggest creating a second app for this repo so that the real world example is more true to real life. Please consider that one of the main motivations for using a mono repo is to reuse libraries in other apps, and seeing this in practice, I believe, would help users understand how to use nx in a multi application.

What are your opinions regarding my suggestion?
Thanks in advance

lib/core doesn't exist

I found that the lib/core doesn't exist.
On the other hand, is only referred by 1 test and used (another import but doesn't use it)
A work around my suffice too

Thanks

turned out to be a reference issue... changed the core to auth and found the resource.

Circular Dependencies on main

It seems to me that there are circular dependencies introduced in the project because api.service.ts references the environments that are inside the conduit app.

circular-deps-issue

From my experience, we usually had the environments as a different folder in the root directory. I can upload a small PR to fix this!

Thanks for all this effort by the way, your repo is amazing.

Does not compile

ERROR in node_modules/@types/jasmine/index.d.ts(14,18): error TS2300: Duplicate identifier 'describe'. node_modules/@types/jasmine/index.d.ts(15,18): error TS2300: Duplicate identifier 'fdescribe'. node_modules/@types/jasmine/index.d.ts(16,18): error TS2300: Duplicate identifier 'xdescribe'. node_modules/@types/jasmine/index.d.ts(25,18): error TS2300: Duplicate identifier 'it'. node_modules/@types/jasmine/index.d.ts(34,18): error TS2300: Duplicate identifier 'fit'. node_modules/@types/jasmine/index.d.ts(35,18): error TS2300: Duplicate identifier 'xit'. node_modules/@types/jasmine/index.d.ts(50,18): error TS2300: Duplicate identifier 'beforeEach'. node_modules/@types/jasmine/index.d.ts(57,18): error TS2300: Duplicate identifier 'afterEach'. node_modules/@types/jasmine/index.d.ts(65,18): error TS2300: Duplicate identifier 'beforeAll'. node_modules/@types/jasmine/index.d.ts(73,18): error TS2300: Duplicate identifier 'afterAll'. node_modules/@types/jasmine/index.d.ts(79,18): error TS2451: Cannot redeclare block-scoped variable 'expect'. node_modules/@types/jasmine/index.d.ts(85,18): error TS2451: Cannot redeclare block-scoped variable 'expect'. node_modules/@types/jasmine/index.d.ts(91,18): error TS2451: Cannot redeclare block-scoped variable 'expect'. node_modules/@types/jasmine/index.d.ts(96,18): error TS2451: Cannot redeclare block-scoped variable 'expect'. node_modules/@types/jasmine/index.d.ts(135,9): error TS2300: Duplicate identifier 'clock'. node_modules/@types/jasmine/index.d.ts(181,15): error TS2428: All declarations of 'ArrayContaining' must have identical type parameters. node_modules/@types/jasmine/index.d.ts(188,15): error TS2428: All declarations of 'ObjectContaining' must have identical type parameters. node_modules/@types/jasmine/index.d.ts(219,10): error TS2300: Duplicate identifier 'CustomEqualityTester'. node_modules/@types/jasmine/index.d.ts(228,10): error TS2300: Duplicate identifier 'CustomMatcherFactory'. node_modules/@types/jasmine/index.d.ts(710,16): error TS2451: Cannot redeclare block-scoped variable 'DEFAULT_TIMEOUT_INTERVAL'. node_modules/@types/jasminewd2/index.d.ts(9,18): error TS2300: Duplicate identifier 'it'. node_modules/@types/jasminewd2/index.d.ts(10,18): error TS2300: Duplicate identifier 'fit'. node_modules/@types/jasminewd2/index.d.ts(11,18): error TS2300: Duplicate identifier 'xit'. node_modules/@types/jasminewd2/index.d.ts(12,18): error TS2300: Duplicate identifier 'beforeEach'. node_modules/@types/jasminewd2/index.d.ts(13,18): error TS2300: Duplicate identifier 'afterEach'. node_modules/@types/jasminewd2/index.d.ts(14,18): error TS2300: Duplicate identifier 'beforeAll'. node_modules/@types/jasminewd2/index.d.ts(15,18): error TS2300: Duplicate identifier 'afterAll'. node_modules/@types/jest/index.d.ts(22,13): error TS2300: Duplicate identifier 'beforeAll'. node_modules/@types/jest/index.d.ts(23,13): error TS2300: Duplicate identifier 'beforeEach'. node_modules/@types/jest/index.d.ts(24,13): error TS2300: Duplicate identifier 'afterAll'. node_modules/@types/jest/index.d.ts(25,13): error TS2300: Duplicate identifier 'afterEach'. node_modules/@types/jest/index.d.ts(26,13): error TS2300: Duplicate identifier 'describe'. node_modules/@types/jest/index.d.ts(27,13): error TS2300: Duplicate identifier 'fdescribe'. node_modules/@types/jest/index.d.ts(28,13): error TS2300: Duplicate identifier 'xdescribe'. node_modules/@types/jest/index.d.ts(29,13): error TS2300: Duplicate identifier 'it'. node_modules/@types/jest/index.d.ts(30,13): error TS2300: Duplicate identifier 'fit'. node_modules/@types/jest/index.d.ts(31,13): error TS2300: Duplicate identifier 'xit'. node_modules/@types/jest/index.d.ts(35,15): error TS2451: Cannot redeclare block-scoped variable 'expect'. node_modules/@types/jest/index.d.ts(933,9): error TS2451: Cannot redeclare block-scoped variable 'DEFAULT_TIMEOUT_INTERVAL'. node_modules/@types/jest/index.d.ts(934,14): error TS2300: Duplicate identifier 'clock'. node_modules/@types/jest/index.d.ts(937,46): error TS2314: Generic type 'ArrayContaining<T>' requires 1 type argument(s). node_modules/@types/jest/index.d.ts(938,45): error TS2314: Generic type 'ObjectContaining<T>' requires 1 type argument(s). node_modules/@types/jest/index.d.ts(964,15): error TS2428: All declarations of 'ArrayContaining' must have identical type parameters. node_modules/@types/jest/index.d.ts(970,15): error TS2428: All declarations of 'ObjectContaining' must have identical type parameters. node_modules/@types/jest/index.d.ts(1078,9): error TS2374: Duplicate string index signature. node_modules/@types/jest/index.d.ts(1081,10): error TS2300: Duplicate identifier 'CustomMatcherFactory'. node_modules/@types/jest/index.d.ts(1089,10): error TS2300: Duplicate identifier 'CustomEqualityTester'. node_modules/@types/jest/index.d.ts(1098,9): error TS2687: All declarations of 'message' must have identical modifiers. node_modules/@types/jest/index.d.ts(1098,9): error TS2717: Subsequent property declarations must have the same type. Property 'message' must be of type 'string', but here has type 'string | (() => string)'. node_modules/@types/jest/index.d.ts(1103,9): error TS2375: Duplicate number index signature.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @types/marked Unavailable
npm eslint-plugin-ngrx Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @bahmutov/cypress-esbuild-preprocessor to v2.2.1
  • chore(deps): update dependency jest-preset-angular to v14.1.1
  • fix(deps): update dependency tslib to v2.6.3
  • fix(deps): update ngrx monorepo (@ngrx/component-store, @ngrx/effects, @ngrx/router-store, @ngrx/signals, @ngrx/store, @ngrx/store-devtools)
  • chore(deps): update angular-eslint monorepo to v18.1.0 (@angular-eslint/eslint-plugin, @angular-eslint/eslint-plugin-template, @angular-eslint/template-parser)
  • chore(deps): update dependency cypress to v13.13.0
  • chore(deps): update dependency eslint-config-prettier to v9.1.0
  • chore(deps): update dependency prettier to v3.3.3
  • chore(deps): update dependency ts-jest to v29.2.2
  • chore(deps): update dependency typescript to v5.5.3
  • chore(deps): update typescript-eslint monorepo (@typescript-eslint/eslint-plugin, @typescript-eslint/parser, @typescript-eslint/utils)
  • fix(deps): update dependency marked to v5.1.2
  • fix(deps): update nrwl monorepo to v19.4.3 (@nx/angular, @nx/cypress, @nx/eslint, @nx/eslint-plugin, @nx/jest, @nx/workspace, nx)
  • chore(deps): update actions/setup-node action to v4
  • chore(deps): update dependency @badeball/cypress-cucumber-preprocessor to v20
  • chore(deps): update dependency @types/marked to v6
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-plugin-cypress to v3
  • chore(deps): update dependency husky to v9
  • fix(deps): update dependency marked to v13
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/production.yml
  • actions/checkout v4
  • actions/setup-node v3
  • South-Paw/action-netlify-deploy v1.2.1
npm
package.json
  • @angular/animations 18.0.0
  • @angular/common 18.0.0
  • @angular/compiler 18.0.0
  • @angular/core 18.0.0
  • @angular/forms 18.0.0
  • @angular/platform-browser 18.0.0
  • @angular/platform-browser-dynamic 18.0.0
  • @angular/router 18.0.0
  • @ngrx/component-store 18.0.0-beta.1
  • @ngrx/effects 18.0.0-beta.1
  • @ngrx/router-store 18.0.0-beta.1
  • @ngrx/signals ^18.0.0-rc.1
  • @ngrx/store 18.0.0-beta.1
  • @nx/angular 19.3.1
  • core-js 3.31.0
  • eslint-plugin-ngrx 2.1.4
  • marked 5.0.1
  • rxjs 7.8.1
  • tslib 2.6.2
  • zone.js 0.14.5
  • @angular-devkit/architect 0.1800.1
  • @angular-devkit/build-angular 18.0.1
  • @angular-devkit/core 18.0.1
  • @angular-devkit/schematics 18.0.1
  • @angular-eslint/eslint-plugin 18.0.1
  • @angular-eslint/eslint-plugin-template 18.0.1
  • @angular-eslint/template-parser 18.0.1
  • @angular/cli ~18.0.1
  • @angular/compiler-cli 18.0.0
  • @angular/language-service 18.0.0
  • @badeball/cypress-cucumber-preprocessor ^19.2.0
  • @bahmutov/cypress-esbuild-preprocessor ^2.2.0
  • @ngrx/store-devtools 18.0.0-beta.1
  • @nx/cypress 19.3.1
  • @nx/eslint 19.3.1
  • @nx/eslint-plugin 19.3.1
  • @nx/jest 19.3.1
  • @nx/workspace 19.3.1
  • @schematics/angular 18.0.1
  • @types/jest 29.5.4
  • @types/marked 4.3.1
  • @types/node 18.19.21
  • @typescript-eslint/eslint-plugin 7.8.0
  • @typescript-eslint/parser 7.8.0
  • @typescript-eslint/utils ^8.0.0-alpha.28
  • cypress 13.9.0
  • dotenv 10.0.0
  • eslint 8.57.0
  • eslint-config-prettier 9.0.0
  • eslint-plugin-cypress 2.14.0
  • eslint-plugin-rxjs ^5.0.3
  • husky 1.3.1
  • jasmine-marbles 0.9.2
  • jest 29.6.4
  • jest-environment-jsdom 29.6.4
  • jest-preset-angular 14.1.0
  • ng-mocks 14.13.0
  • nx 19.3.1
  • prettier 3.1.0
  • react ^18.2.0
  • react-dom ^18.2.0
  • ts-jest 29.1.1
  • ts-node 10.9.1
  • typescript 5.4.5
  • webpack 5.88.2

  • Check this box to trigger a request for Renovate to run again on this repository

TSLint still in recommended plugins

"ms-vscode.vscode-typescript-tslint-plugin" is still in the recommended plugins list for VSCode. I think this should be changed to the eslint plugin.

[QUESTION] ng build instead of nx build

Hi,

I noticed that in your package.json, you are using ng build instead of nx build. I'm wondering if there's a specific reason for this choice, and whether switching to nx build would provide any benefits, such as utilizing Nx's caching capabilities. I am new to nx so I do not know.

Here is the relevant part of the package.json:

 "scripts": {
    "ng": "nx",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "nx workspace-lint && ng lint",
    "e2e": "ng e2e",
    "nx": "nx",
    "affected:apps": "nx affected:apps",
    "affected:libs": "nx affected:libs",
    "affected:build": "nx affected:build",
    "affected:e2e": "nx affected:e2e",
    "affected:test": "nx affected:test",
    "affected:lint": "nx affected:lint",
    "affected:dep-graph": "nx affected:dep-graph",
    "affected": "nx affected",
    "format": "nx format:write",
    "format:write": "nx format:write",
    "format:check": "nx format:check",
    "update": "ng update @nrwl/workspace",
    "update:check": "ng update",
    "dep-graph": "nx dep-graph",
    "workspace-schematic": "nx workspace-schematic",
    "help": "nx help",
    "postinstall": "node ./decorate-angular-cli.js"
  },

I'm not sure if opening an issue is the right way to ask this question, so I apologize if this is not the correct channel.

Thank you for your help!

`npm run test` is failing due to ngrxPush pipe not found

I forked and ran the application in an effort to learn more about using Cypress in a real world app using NX and NGRX. I am getting a couple of linting and Jest errors when running npm run test command. @stefanoslig Can you please help me?

 PASS  apps/conduit/src/app/layout/footer/footer.component.spec.ts
 PASS  apps/conduit/src/app/layout/navbar/navbar.component.spec.ts
 FAIL  apps/conduit/src/app/app.component.spec.ts
  โ— AppComponent โ€บ should create

    Template parse errors:
    The pipe 'ngrxPush' could not be found ("<conduit-navbar [isLoggedIn]="[ERROR ->]isLoggedIn$ | ngrxPush" [user]="user$ | ngrxPush"></conduit-navbar>
    "): ng:///DynamicTestModule/AppComponent.html@0:30
    The pipe 'ngrxPush' could not be found ("<conduit-navbar [isLoggedIn]="isLoggedIn$ | ngrxPush" [user]="[ERROR ->]user$ | ngrxPush"></conduit-navbar>
    <router-outlet></router-outlet>
    <conduit-footer></conduit-foote"): ng:///DynamicTestModule/AppComponent.html@0:62

      at syntaxError (../../../packages/compiler/src/util.ts:100:17)
      at TemplateParser.Object.<anonymous>.TemplateParser.parse (../../../packages/compiler/src/template_parser/template_parser.ts:106:13)
      at JitCompiler.Object.<anonymous>.JitCompiler._parseTemplate (../../../packages/compiler/src/jit/compiler.ts:297:33)
      at JitCompiler.Object.<anonymous>.JitCompiler._compileTemplate (../../../packages/compiler/src/jit/compiler.ts:275:11)
      at ../../../packages/compiler/src/jit/compiler.ts:206:42
          at Set.forEach (<anonymous>)
      at JitCompiler.Object.<anonymous>.JitCompiler._compileComponents (../../../packages/compiler/src/jit/compiler.ts:206:15)
      at ../../../packages/compiler/src/jit/compiler.ts:117:12
      at Object.then (../../../packages/compiler/src/util.ts:89:74)

Articles fetching event is being accumulated

STR:

  1. Load Home page. Do not log in.
  2. Click on the favorite button of any article on the main page
    -> loadArticles is being invoked on redirect to login page
  3. Click logo to go back to home page
    -> loadArticles is being invoked twice

Repeat steps 1 and 2.

tsconfig.app.json

I'm just wondering, why do you include all these libs in your tsconfig.app.json?

  "include": [
    "**/*.d.ts",
    "../../libs/home/src/index.ts",
    "../../libs/editor/src/index.ts",
    "../../libs/settings/src/index.ts",
    "../../libs/article/src/index.ts",
    "../../libs/profile/src/index.ts"
  ],

Is the reason behind this, just to have all these modules included in the main bundle?
Or you just want the ready as soon as the apps is loaded?

Cause I think more elegant solution would be setting the preloadingStrategy to:

RouterModule.forRoot( routes, {
   preloadingStrategy: PreloadAllModules
})

what do you think?

Cannot read property 'split' of undefined

I have an issue while build the project
`$ ng serve --verbose

nx run conduit:serve --verbose
Cannot read properties of undefined (reading 'split')
TypeError: Cannot read properties of undefined (reading 'split')
at WorkspaceNodeModulesArchitectHost.resolveBuilder (/home/projects/ser/angular-ngrx-nx-realworld-example-app/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js:110:55)
at ArchitectTargetJobRegistry._resolveBuilder (/home/projects/ser/angular-ngrx-nx-realworld-example-app/node_modules/@angular-devkit/architect/src/architect.js:101:54)
at MergeMapSubscriber.project (/home/projects/ser/angular-ngrx-nx-realworld-example-app/node_modules/@angular-devkit/architect/src/architect.js:161:25)
at MergeMapSubscriber._tryNext (/home/projects/ser/angular-ngrx-nx-realworld-example-app/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/operators/mergeMap.js:67:27)
at MergeMapSubscriber._next (/home/projects/ser/angular-ngrx-nx-realworld-example-app/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/operators/mergeMap.js:57:18)
at MergeMapSubscriber.Subscriber.next (/home/projects/ser/angular-ngrx-nx-realworld-example-app/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Subscriber.js:66:18)
at /home/projects/ser/angular-ngrx-nx-realworld-example-app/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/util/subscribeToPromise.js:7:24

โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”

NX ERROR Running target "conduit:serve" failed

Failed tasks:

  • conduit:serve

Hint: run the command with --verbose for more details.

`

$ node -v
v16.10.0

Error compiling

Hello guys i just clones and npm installed your app, but i'm getting the following compile error:
WARNING in Circular dependency detected:
libs\ngrx-forms\src\lib+state\ngrx-forms.actions.ts -> libs\ngrx-forms\src\lib+state\ngrx-forms.reducer.ts -> libs\ngrx-forms\src\lib+state\ngrx-forms.actions.ts

WARNING in Circular dependency detected:
libs\ngrx-forms\src\lib+state\ngrx-forms.reducer.ts -> libs\ngrx-forms\src\lib+state\ngrx-forms.actions.ts -> libs\ngrx-forms\src\lib+state\ngrx-forms.reducer.ts

WARNING in Circular dependency detected:
libs\profile\src\lib+state\profile.actions.ts -> libs\profile\src\lib+state\profile.reducer.ts -> libs\profile\src\lib+state\profile.actions.ts

WARNING in Circular dependency detected:
libs\profile\src\lib+state\profile.reducer.ts -> libs\profile\src\lib+state\profile.actions.ts -> libs\profile\src\lib+state\profile.reducer.ts
ERROR in F:/Workspaces/Source/angular-ngrx-nx-realworld-example-app/libs/editor/src/lib/+state/editor.actions.ts 36:12-23
"export 'ArticleData' was not found in '@angular-ngrx-nx-realworld-example-app/api'
ERROR in F:/Workspaces/Source/angular-ngrx-nx-realworld-example-app/libs/ngrx-forms/src/lib/+state/ngrx-forms.actions.ts 46:12-18
"export 'Errors' was not found in './ngrx-forms.reducer'
ERROR in F:/Workspaces/Source/angular-ngrx-nx-realworld-example-app/libs/profile/src/lib/+state/profile.actions.ts 30:12-19
"export 'Profile' was not found in './profile.reducer'
ERROR in F:/Workspaces/Source/angular-ngrx-nx-realworld-example-app/libs/profile/src/lib/+state/profile.actions.ts 57:12-19
"export 'Profile' was not found in './profile.reducer'
ERROR in F:/Workspaces/Source/angular-ngrx-nx-realworld-example-app/libs/profile/src/lib/+state/profile.actions.ts 84:12-19
"export 'Profile' was not found in './profile.reducer'

Thanks! in advance for help

Fresh Install Doesn't Run

`ERROR in libs/ngrx-forms/src/lib/+state/ngrx-forms.facade.ts:3:10 - error TS2305: Module '"./ngrx-forms.interfaces"' has no exported member 'NgrxFormsState'.

3 import { NgrxFormsState } from './ngrx-forms.interfaces';`

Enhance Observables subscribion

Subscribed observables should be unsubscribed after the component being destroyed. I would even prefer moving the observable subscribing to HTML template and subscribing using Async pipe to guarantee unsubscribing will be managed automatically.

API Domain change

Hello!

Due to governance changes, we are now using the realworld.io domain for the RealWorld demo (both client and API).
Requests from conduit.productionready.io are redirected to api.realworld.io, but such a redirection might lead to inconsistent responses.

We encourage domain change for the community.
If this repository is maintained anymore, we'll consider hosting a demo of your implementation in a few weeks with the domain change.

The demo link will be added to the RealWorld documentation.

@ngrx/store: The feature name "auth" does not exist in the state

nx run conduit:test [existing outputs match the cache, left as is]
 PASS   conduit  apps/conduit/src/app/layout/footer/footer.component.spec.ts
 PASS   conduit  apps/conduit/src/app/layout/navbar/navbar.component.spec.ts
 PASS   conduit  apps/conduit/src/app/app.component.spec.ts
  โ— Console

    console.warn
      @ngrx/store: The feature name "auth" does not exist in the state, therefore createFeatureSelector cannot access it.  Be sure it is imported in a loaded module using StoreModule.forRoot('auth', ...) or StoreModule.forFeature('auth', ...).  If the default state is intended to be undefined, as is the case with router state, this development-only warning message can be ignored.

      at ../../modules/store/src/selector.ts:755:17
      at ../../modules/store/src/selector.ts:574:64
          at Array.map (<anonymous>)
      at defaultStateFn (../../modules/store/src/selector.ts:574:52)
      at ../../modules/store/src/selector.ts:718:30
      at memoized (../../modules/store/src/selector.ts:101:33)
      at ../../modules/store/src/selector.ts:574:64
          at Array.map (<anonymous>)


Test Suites: 3 passed, 3 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        6.461 s
Ran all test suites.

absolute imports

Is there a reason why absolute imports are not configured in any examples on GitHub. I searched for real-world application. This repo looks great but for example in file:

/// angular-ngrx-nx-realworld-example-app/libs/article-list/src/index.ts 
export { ArticleListModule } from './lib/article-list.module';
export * from './lib/+state/article-list.reducer';
export * from './lib/+state/article-list.actions';
export * from './lib/+state/article-list.facade';

Would it be possible to have something like this?

/// angular-ngrx-nx-realworld-example-app/libs/article-list/src/index.ts 
export { ArticleListModule } from 'lib/article-list.module';
export * from 'lib/+state/article-list.reducer';
export * from 'lib/+state/article-list.actions';
export * from 'lib/+state/article-list.facade';

This may seem like a small change but it makes the code easier to read and easier to refactor. ๐Ÿค”

Edit: I guess I could just prepend the package @name but somehow that seems worse than ./lib because @ looks like a 3rd party library.

Not running libs tests

git clone github.com:stefanoslig/angular-ngrx-nx-realworld-example-app.git ./
npm install
ng test
[email protected] test /Users/vuvgag/Repositories/vuvgag/math-checker
> ng test


> nx run conduit:test 
 PASS   conduit  apps/conduit/src/app/layout/footer/footer.component.spec.ts
 PASS   conduit  apps/conduit/src/app/layout/navbar/navbar.component.spec.ts
 PASS   conduit  apps/conduit/src/app/app.component.spec.ts
  โ— Console

    console.warn
      @ngrx/store: The feature name "auth" does not exist in the state, therefore createFeatureSelector cannot access it.  Be sure it is imported in a loaded module using StoreModule.forRoot('auth', ...) or StoreModule.forFeature('auth', ...).  If the default state is intended to be undefined, as is the case with router state, this development-only warning message can be ignored.

      at ../../modules/store/src/selector.ts:755:17
      at ../../modules/store/src/selector.ts:574:64
          at Array.map (<anonymous>)
      at defaultStateFn (../../modules/store/src/selector.ts:574:52)
      at ../../modules/store/src/selector.ts:718:30
      at memoized (../../modules/store/src/selector.ts:101:33)
      at ../../modules/store/src/selector.ts:574:64
          at Array.map (<anonymous>)


Test Suites: 3 passed, 3 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        2.055 s
Ran all test suites.

โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”

>  NX   SUCCESS  Running target "test" succeeded

Expected it to run all the tests from the libs folder. Tests continue to not run even when changing the code of a libs module.

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.