Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Uncaught Error: Template parse errors: 'ion-multi-picker' is not a known element #70

Closed
@emcniece

Description

@emcniece

Full Error

compiler.es5.js:1690 Uncaught Error: Template parse errors:
'ion-multi-picker' is not a known element:
1. If 'ion-multi-picker' is an Angular component, then verify that it is part of this module.
2. If 'ion-multi-picker' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
      <ion-item>
        <ion-label>Simple Picker</ion-label>
        [ERROR ->]<ion-multi-picker item-content></ion-multi-picker>
    </ion-item>

"): ng:///ComponentsModule/CueEditModal.html@70:8
    at syntaxError (compiler.es5.js:1690)
    at TemplateParser.parse (compiler.es5.js:12810)
    at JitCompiler._compileTemplate (compiler.es5.js:26962)
    at compiler.es5.js:26882
    at Set.forEach (<anonymous>)
    at JitCompiler._compileComponents (compiler.es5.js:26882)
    at compiler.es5.js:26769
    at Object.then (compiler.es5.js:1679)
    at JitCompiler._compileModuleAndComponents (compiler.es5.js:26768)
    at JitCompiler.compileModuleAsync (compiler.es5.js:26697)
    at PlatformRef_._bootstrapModuleWithZone (core.es5.js:4536)
    at PlatformRef_.bootstrapModule (core.es5.js:4522)
    at Object.779 (main.ts:5)
    at __webpack_require__ (bootstrap 14debaf1ac5a540416f3:54)
    at webpackJsonpCallback (bootstrap 14debaf1ac5a540416f3:25)
    at main.js:1

System Info

ionic info

cli packages: (/Users/emcniece/Code/ionic/test-app/node_modules)

    @ionic/cli-utils  : 1.10.2
    ionic (Ionic CLI) : 3.10.3

global packages:

    Cordova CLI : 7.0.1

local packages:

    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : android 6.2.3 browser 4.1.0 ios 4.4.0
    Ionic Framework    : ionic-angular 3.6.0

System:

    Android SDK Tools : 25.2.5
    ios-deploy        : 1.9.1
    Node              : v8.3.0
    npm               : 4.2.0
    OS                : macOS Sierra
    Xcode             : Xcode 8.3.3 Build version 8E3004b

Reproduce

I can't actually reproduce this in a new project! This error is present as I add it to an existing project (which is unfortunately private), but here's the steps I am taking for a new project that works 100%.

The private project is nearly identical in construction to the new project - very confusing.

  1. ionic start test-app tabs && cd test-app
  2. npm install ion-multi-picker --save
  3. Add to app.module.ts
  4. Add to home.ts
  5. Add to home.html
  6. works great

I think this might be the same as one of the other issues, but they're sorely lacking in detail.

Activity

raychenfj

raychenfj commented on Sep 21, 2017

@raychenfj
Owner

Hi @emcniece

Have you imported the MultiPickerModule

import { MultiPickerModule } from 'ion-multi-picker';

@NgModule({
  ...
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    MultiPickerModule
  ],
  ...
})
emcniece

emcniece commented on Sep 21, 2017

@emcniece
Author

Indeed I have, in both the private project and the test/reproduction project. Placing the import before or after the IonicModule.forRoot(MyApp) line doesn't seem to make a difference.

Repository owner deleted a comment from zxdeer on Sep 21, 2017
raychenfj

raychenfj commented on Sep 21, 2017

@raychenfj
Owner

I agree, the import sequence doesn't matter.

Are you using it in any submodule ? If you are, please try import the MultiPickerModule to your submodule as well.

If it doesn't work still, I'm afraid you need to provide a minimal demo to reproduce it.

raychenfj

raychenfj commented on Oct 7, 2017

@raychenfj
Owner

Closed since there is no further feedback.

You can re-open it if it happen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @emcniece@raychenfj

        Issue actions

          Uncaught Error: Template parse errors: 'ion-multi-picker' is not a known element · Issue #70 · raychenfj/ion-multi-picker