Skip to content
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.

Cannot be used in es6 module #81

Open
dravenk opened this issue Oct 11, 2018 · 2 comments
Open

Cannot be used in es6 module #81

dravenk opened this issue Oct 11, 2018 · 2 comments

Comments

@dravenk
Copy link

dravenk commented Oct 11, 2018

// Not work
import  "waterwheel";

// Not work
// import '../node_modules/waterwheel/lib/waterwheel.js'

// Not work
// import('waterwheel').then((RetrieveStore) => {
//     console.log("MyView1 loaded");
// }).catch((reason) => {
//     console.log("MyView1 failed to load", reason);
// });

console print these msg.

Uncaught TypeError: Cannot set property 'Waterwheel' of undefined
    at waterwheel.js:2
    at waterwheel.js:3

dependencies

    "@polymer/polymer": "^3.0.0",
    "@webcomponents/webcomponentsjs": "^2.0.0",
    "waterwheel": "git+https://github.com/acquia/waterwheel.js.git"

Google Chrome is up to date
Version 69.0.3497.100 (Official Build) (64-bit)

npm . 6.4.1

@dravenk
Copy link
Author

dravenk commented Oct 12, 2018

import Waterwheel from 'waterwheel/lib/waterwheel'
Uncaught SyntaxError: The requested module '../node_modules/waterwheel/lib/waterwheel.js' does not provide an export named 'default'

import 'waterwheel/lib/waterwheel'
waterwheel.js:1 Uncaught ReferenceError: require is not defined
    at waterwheel.js:1

import('waterwheel/lib/waterwheel');
retrieve-data.js:6 Uncaught ReferenceError: Waterwheel is not defined
    at retrieve-data.js:6
(anonymous) @ retrieve-data.js:6
waterwheel.js:1 Uncaught (in promise) ReferenceError: require is not defined
    at waterwheel.js:1

import * as Whaterwheel  from "waterwheel";
waterwheel.js:2 Uncaught TypeError: Cannot set property 'Waterwheel' of undefined
    at waterwheel.js:2
    at waterwheel.js:3

@dravenk
Copy link
Author

dravenk commented Oct 16, 2018

In order to use es6, I fork this to https://github.com/dravenk/waterpower .

@dravenk dravenk changed the title Cannot be used in polymer 3 Cannot be used in es6 module Oct 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant