javascript - The reduce function causing errors -


the errors shown in chrome console:

1. http://localhost:3000/vendor/@ngrx/store/index.js failed load resource: server responded status of 404 (not found)  2. localhost/:19 error: error: xhr error (404 not found) loading http://localhost:3000/vendor/@ngrx/store/index.js(…) (anonymous function) @ localhost/:19 

reducer.ts: *i cant find aproppiate types something1 return value's type , state type.

import { action} '@ngrx/store'; export const something1 = (state: = {}, action:action) => {   switch (action.type) {     default:       return state;   } }; 

main.ts: removing "providestore({something1})" cause app work

import { bootstrap }    '@angular/platform-browser-dynamic'; import { appcomponent } './app.component'; import { disabledeprecatedforms, provideforms } '@angular/forms'; import {accountservice} "./account.service"; import {providestore} '@ngrx/store'; import {something1} "./reducer";  bootstrap(appcomponent, [   accountservice,   disabledeprecatedforms(),   provideforms(),   providestore({something1}) ])   .catch((err: any) => console.error(err)); 

solved!

i changed in systemjs.config.js inside map value of '@ngrx' vendor/@ngrx 'node_modules/@ngrx'.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -