HubSpot / messenger

Growl-style alerts and messages for your app. #hubspot-open-source
http://github.hubspot.com/messenger/
MIT License
4.02k stars 406 forks source link

import not working after installing npm package in React #131

Open pavankumar1792 opened 6 years ago

pavankumar1792 commented 6 years ago

Installed messenger-hubspot package and import not working in react. Any react specific sample implementation or docs would be helpful.

node_1 | [2] [dev:server] /usr/src/app/tmp/webpack:/~/messenger-hubspot/build/js/messenger.js:22 node_1 | [2] })(); node_1 | [2] ^ node_1 | [2] ReferenceError: window is not defined node_1 | [2] at /usr/src/app/tmp/webpack:/~/messenger-hubspot/build/js/messenger.js:10:1 node_1 | [2] at Object.exports.esModule (/usr/src/app/tmp/webpack:/~/messenger-hubspot/build/js/messenger.js:22:2) node_1 | [2] at __webpack_require (/usr/src/app/tmp/webpack:/webpack/bootstrap 36d1633f01919608117f:19:1) node_1 | [2] at Object._prevMessenger (/usr/src/app/tmp/webpack:/src/routes/BlackList.js:28:1) node_1 | [2] at webpack_require (/usr/src/app/tmp/webpack:/webpack/bootstrap 36d1633f01919608117f:19:1) node_1 | [2] at Object. (/usr/src/app/tmp/webpack:/src/app/routes.js:37:1) node_1 | [2] at webpack_require (/usr/src/app/tmp/webpack:/webpack/bootstrap 36d1633f01919608117f:19:1) node_1 | [2] at Object. (/usr/src/app/tmp/webpack:/server.babel.js:9:1) node_1 | [2] at __webpack_require__ (/usr/src/app/tmp/webpack:/webpack/bootstrap 36d1633f01919608117f:19:1) node_1 | [2] at Object. (/usr/src/app/tmp/bundle.js:50:19) node_1 | [2] [dev:server] [nodemon] app crashed - waiting for file changes before starting...