-
Notifications
You must be signed in to change notification settings - Fork 508
How to import node module into project? #197
Copy link
Copy link
Closed
Description
Failed to introduce a third-party package.
https://github.com/acquia/waterwheel.js
// 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
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels