question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not importing correctly - pipe not found

See original GitHub issue

Installed this package, imported into my main @NgModule like below, and placed it in my imports under that, but still get the error at the bottom.

import { MomentModule } from 'angular2-moment';
zone.js?fad3:355 Unhandled Promise rejection: Template parse errors:
The pipe 'amDuration' could not be found ("
          <tr>
            <td>Service</td>
            <td>[ERROR ->]{{ 365 | amDuration:'seconds' }}</td>

Have an angular 2 project using webpack that is similar in structure to https://github.com/AngularClass/angular2-webpack-starter

Any thoughts? Should this work when not using system.js?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
urishcommented, Nov 1, 2016

@AKApumkin in my projects, I didn’t need to add anything to the CLI config json - it should work out of the box.

0reactions
AKApumkincommented, Nov 1, 2016

I have the same issue, but for the angular CLI JSON config file. there is a lot of conflicting information on where to put external libraries. Some say the in Scripts tag, some say inside packages and some say after packages. I have tried all, but no joy. below is half the config file, any nudge in the right direction would be appreciated.

>   "addons": [],
  "packages": [
  ],
  "e2e": {
    "protractor": {
      "config": "./protractor.conf.js"
    }
  },
  "test": {
    "karma": {
      "config": "./karma.conf.js"
    }
  },
  "defaults": {
    "styleExt": "css",
    "prefixInterfaces": false
  },
  "angular2-moment": {
      "main": "./node_modules/angular2-moment/index.js",
      "defaultExtension": "js"
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

The pipe ' ' could not be found angular2 custom pipe
In my case I've declared the pipe in a separate module and imported this pipe module in any other module having components using...
Read more >
NG0302: Pipe not found! - Angular
Use the pipe name to trace where the pipe is declared and used. To resolve this error, ensure that: ... If you recently...
Read more >
[Debugging] The pipe {name} could not be found - YouTube
Key moments. View all · Verify that the Pipe Is Available in the Appropriate Ng Module · Verify that the Pipe Is Available...
Read more >
[Solved] Pipe not found in custom component - Ionic Forum
The pipe 'min2duration' could not be found. I have the pipes grouped in pipes module: import { NgModule } from '@angular/core'; // Pipes...
Read more >
The pipe 'mypipe' could not be found · Issue #1403 - GitHub
Hi all, I'm trying to use pipes and I've developed my own very simplified ... could not be found Here's the code to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found