peterbsmyth / ngx-breadcrumbs

Angular 4+ routing breadcrumbs
MIT License
59 stars 43 forks source link

Ran into some error #1

Closed bkbaheti closed 7 years ago

bkbaheti commented 7 years ago

I have a multilayered angular app which has lets say app as the root module, then crm as the nested module. Now since my breadcrumb sits in the 'crm.component.html' and the routes served after this I made the following changes to the suggested method of installing

Used npm to install, got this warning in the log

npm WARN ngx-breadcrumbs@0.0.1 requires a peer of lodash.template@^4.4.0 but none was installed.

The structure of my app is like this

  1. Added the import statements in crm.module.ts like this

import { McBreadcrumbsModule } from 'ngx-breadcrumbs';

@NgModule({
  imports: [
    CommonModule,
    CrmRoutingModule,
    McBreadcrumbsModule.forRoot(),
  ],
  declarations: [
    CrmComponent,
    BreadcrumbComponent,
    NavigationComponent,
    RightSidebarComponent,
    SidebarComponent,
  ]
}) 
  1. Added the in crm.component.html
<div id="wrapper">
  <ma-navigation></ma-navigation>
  <ma-sidebar></ma-sidebar>
  <div id="page-wrapper">
    <div class="container-fluid">
      <mc-breadcrumbs></mc-breadcrumbs>
      <ma-rightsidebar></ma-rightsidebar>
    </div>
    <footer class="footer">

    </footer>

  </div>
</div>
  1. Error I get while serving the app
    ERROR in ./node_modules/ngx-breadcrumbs/ngx-breadcrumbs/ngx-breadcrumbs.es5.js
    Module not found: Error: Can't resolve 'lodash.template' in '/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/ngx-breadcrumbs'
    resolve 'lodash.template' in '/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/ngx-breadcrumbs'
    Parsed request is a module
    using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/package.json (relative path: ./ngx-breadcrumbs)
    Field 'browser' doesn't contain a valid alias configuration
    after using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/package.json (relative path: ./ngx-breadcrumbs)
    resolve as module
      /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/ngx-breadcrumbs/node_modules doesn't exist or is not a directory
      /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/node_modules doesn't exist or is not a directory
      /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/node_modules doesn't exist or is not a directory
      /Applications/MAMP/htdocs/node_modules doesn't exist or is not a directory
      /Applications/MAMP/node_modules doesn't exist or is not a directory
      /Applications/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      looking for modules in /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules
        using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules)
          using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules/lodash.template)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template.js doesn't exist
            as directory
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template doesn't exist
      looking for modules in /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules
        using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules)
          using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules/lodash.template)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template.js doesn't exist
            as directory
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template doesn't exist
      looking for modules in /Applications/MAMP/htdocs/supreme_frontend_crm/src
        using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src)
          using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src/lodash.template)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template.js doesn't exist
            as directory
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template doesn't exist
      looking for modules in /Applications/MAMP/htdocs/supreme_frontend_crm/src
        using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src)
          using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src/lodash.template)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template.js doesn't exist
            as directory
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template doesn't exist
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/ngx-breadcrumbs/node_modules]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/node_modules]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/node_modules]
    [/Applications/MAMP/htdocs/node_modules]
    [/Applications/MAMP/node_modules]
    [/Applications/node_modules]
    [/node_modules]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template.ts]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template.js]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template.ts]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template.js]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.template]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template.ts]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template.js]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template.ts]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template.js]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.template]
    @ ./node_modules/ngx-breadcrumbs/ngx-breadcrumbs/ngx-breadcrumbs.es5.js 13:0-44
    @ ./src/app/crm/crm.module.ts
    @ ./src/app/app.module.ts
    @ ./src/main.ts
    @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
    ERROR in ./node_modules/ngx-breadcrumbs/ngx-breadcrumbs/ngx-breadcrumbs.es5.js
    Module not found: Error: Can't resolve 'lodash.templatesettings' in '/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/ngx-breadcrumbs'
    resolve 'lodash.templatesettings' in '/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/ngx-breadcrumbs'
    Parsed request is a module
    using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/package.json (relative path: ./ngx-breadcrumbs)
    Field 'browser' doesn't contain a valid alias configuration
    after using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/package.json (relative path: ./ngx-breadcrumbs)
    resolve as module
      /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/ngx-breadcrumbs/node_modules doesn't exist or is not a directory
      /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/node_modules doesn't exist or is not a directory
      /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/node_modules doesn't exist or is not a directory
      /Applications/MAMP/htdocs/node_modules doesn't exist or is not a directory
      /Applications/MAMP/node_modules doesn't exist or is not a directory
      /Applications/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      looking for modules in /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules
        using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules)
          using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules/lodash.templatesettings)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings.js doesn't exist
            as directory
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings doesn't exist
      looking for modules in /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules
        using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules)
          using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./node_modules/lodash.templatesettings)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings.js doesn't exist
            as directory
              /Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings doesn't exist
      looking for modules in /Applications/MAMP/htdocs/supreme_frontend_crm/src
        using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src)
          using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src/lodash.templatesettings)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings.js doesn't exist
            as directory
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings doesn't exist
      looking for modules in /Applications/MAMP/htdocs/supreme_frontend_crm/src
        using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src)
          using description file: /Applications/MAMP/htdocs/supreme_frontend_crm/package.json (relative path: ./src/lodash.templatesettings)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings.js doesn't exist
            as directory
              /Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings doesn't exist
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/ngx-breadcrumbs/node_modules]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/ngx-breadcrumbs/node_modules]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/node_modules]
    [/Applications/MAMP/htdocs/node_modules]
    [/Applications/MAMP/node_modules]
    [/Applications/node_modules]
    [/node_modules]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings.ts]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings.js]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings.ts]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings.js]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/node_modules/lodash.templatesettings]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings.ts]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings.js]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings.ts]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings.js]
    [/Applications/MAMP/htdocs/supreme_frontend_crm/src/lodash.templatesettings]
    @ ./node_modules/ngx-breadcrumbs/ngx-breadcrumbs/ngx-breadcrumbs.es5.js 14:0-60
    @ ./src/app/crm/crm.module.ts
    @ ./src/app/app.module.ts
    @ ./src/main.ts
    @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
McNull commented 7 years ago

I've updated the dependencies.

Thank you for reporting this!