angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.13k stars 1.24k forks source link

Lodash has no exported member 'noop' #2801

Closed jackkum closed 3 years ago

jackkum commented 3 years ago

Item | Version generator-angular-fullstack | 5.0.0-rc.1 Node | 8.17.0 npm | 6.14.11 Operating System | Ubuntu 14.10

Item | Answer Transpiler | TypeScript Markup | HTML CSS | CSS Router | ngRoute Client Tests | Mocha DB | SQL default, MongoDB Auth | Y

Hello! I've got errors with new install

ERROR in [at-loader] ./client/components/socket/socket.service.ts:5:10 
    TS2305: Module '"***/node_modules/@types/lodash/index"' has no exported member 'noop'.

ERROR in [at-loader] ./client/components/socket/socket.service.ts:5:20 
    TS2305: Module '"***/node_modules/@types/lodash/index"' has no exported member 'remove'.

ERROR in [at-loader] ./client/components/util.ts:7:5 
    TS2305: Module '"***/node_modules/@types/lodash/index"' has no exported member 'noop'.

I fixed it by replacing lodash with lodash-es socket.service

import { noop,find,remove } from 'lodash-es';

util

import { isFunction, } from 'lodash';
import { noop, } from 'lodash-es';
jackkum commented 3 years ago

New template generated with generator-angular-fullstack@5.0.0-rc.4 no have this issue.