Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Error when importing package #1

Open
matine opened this issue Sep 4, 2017 · 2 comments
Open

Error when importing package #1

matine opened this issue Sep 4, 2017 · 2 comments

Comments

@matine
Copy link

matine commented Sep 4, 2017

I have followed the example code and have imported the package like so:

import IdealPostcodes from 'ideal-postcodes-autocomplete';

However I am getting an error 'Cannot read property 'Controller' of undefined'.

Seems like it's not being exported as expected? Can you reproduce this error?

@cblanc
Copy link
Member

cblanc commented Sep 28, 2017

Hi @matine

If I recall correctly, did we resolve this on chat.ideal-postcodes.co.uk some weeks ago

If not, for the time being, you will have to access this package from the window object. So while you can install via npm or bower, it's accessible via window and not the package manager. This may mean you need to whitelist this package as a globally available dependency for some module bundlers.

A future version will allow you to import or require the package. In the meantime I will leave this issue open until that functionality has been implemented

@cblanc cblanc closed this as completed Nov 30, 2018
@satyamhardia
Copy link

satyamhardia commented Apr 13, 2019

Hi @cblanc

I'm having the same problem.

A future version will allow you to import or require the package. In the meantime I will leave this issue open until that functionality has been implemented

Is this feature is implemented in current version?

@cblanc cblanc reopened this Apr 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants