I have an angular 2 app generated using angular cli. I am using typescript. It fails when I import redux-logger using:const createLogger = require('redux-logger');
The error is:
The Broccoli Plugin: [BroccoliTypeScriptCompiler] failed with:
Error: Typescript found the following errors:
/Users/abdul.badru/2016/Development/BudgetSoftware/app/budgetapp/tmp/broccoli_type_script_compiler-input_base_path-eQlgH862.tmp/0/src/app/app.module.ts (24, 22): Cannot find name 'require'.
/Users/abdul.badru/2016/Development/BudgetSoftware/app/budgetapp/tmp/broccoli_type_script_compiler-input_base_path-eQlgH862.tmp/0/src/app/store/index.ts (5, 22): Cannot find name 'require'.
What is going on here? What I am missing?
import createLogger from "redux-logger"?Cannot find module 'redux-logger'.npm install --save redux-loggerand see if it works.Cannot find module 'redux-logger'. But when I putconst createLogger = require('redux-logger');and point the cursor overrequireit saysCorresponding file is not included in tsconfig.jsonnpm install --save redux-loggeror did you only runnpm install?