abreits / amqp-ts

AmqpSimple, a RabbitMQ tested Amqp library written in and for Typescript
MIT License
133 stars 37 forks source link

WARNING in ./~/colors/lib/colors.js 138:29-43 Critical dependency: the request of a dependency is an expression #21

Closed sdfullstack closed 6 years ago

sdfullstack commented 7 years ago

I followed your guide, but I found an error when I try to declareEXchange(...)

let exchange = connection.declareExchange("notifications"); ==> Here are the error I got from browser console: Angular is running in the development mode. Call enableProdMode() to enable the production mode. 2bluebird.js:1542 Unhandled rejection TypeError: QS.unescape is not a function at openFrames (http://localhost:4200/vendor.bundle.js:85237:16) at connect (http://localhost:4200/vendor.bundle.js:85315:14) at Object.connect (http://localhost:4200/vendor.bundle.js:84107:3) at Connection.tryToConnect (http://localhost:4200/vendor.bundle.js:83053:17) at http://localhost:4200/vendor.bundle.js:83025:19 at Promise._execute (http://localhost:4200/vendor.bundle.js:88871:9) at Promise._resolveFromExecutor (http://localhost:4200/vendor.bundle.js:91149:18) at new Promise (http://localhost:4200/vendor.bundle.js:90745:10) at Connection.rebuildConnection (http://localhost:4200/vendor.bundle.js:83024:28) at new Connection (http://localhost:4200/vendor.bundle.js:83013:14) at new AppComponent (http://localhost:4200/main.bundle.js:62:26) at createClass (http://localhost:4200/vendor.bundle.js:14408:26) at createDirectiveInstance (http://localhost:4200/vendor.bundle.js:14250:37) at createViewNodes (http://localhost:4200/vendor.bundle.js:15600:49) at createRootView (http://localhost:4200/vendor.bundle.js:15505:5) at callWithDebugContext (http://localhost:4200/vendor.bundle.js:16636:42) at Object.debugCreateRootView [as createRootView] (http://localhost:4200/vendor.bundle.js:16097:12) at ComponentFactory_.create (http://localhost:4200/vendor.bundle.js:13441:46) at ComponentFactoryBoundToModule.create (http://localhost:4200/vendor.bundle.js:7050:29) at ApplicationRef_.bootstrap (http://localhost:4200/vendor.bundle.js:8632:57) at http://localhost:4200/vendor.bundle.js:8419:79 printWarning @ bluebird.js:1542 formatAndLogError @ bluebird.js:1258 fireRejectionEvent @ bluebird.js:1283 Promise._notifyUnhandledRejection @ bluebird.js:729 (anonymous) @ bluebird.js:154 ZoneDelegate.invokeTask @ zone.js:398 onInvokeTask @ core.es5.js:4116 ZoneDelegate.invokeTask @ zone.js:397 Zone.runTask @ zone.js:165 ZoneTask.invoke @ zone.js:460 timer @ zone.js:1540 client?ffdb:40 [WDS] Warnings while compiling. client?ffdb:98 ./~/colors/lib/colors.js 138:29-43 Critical dependency: the request of a dependency is an expression warnings @ client?ffdb:98 sock.onmessage @ socket.js:37 EventTarget.dispatchEvent @ eventtarget.js:51 (anonymous) @ main.js:274 SockJS._transportMessage @ main.js:272 EventEmitter.emit @ emitter.js:50 WebSocketTransport.ws.onmessage @ websocket.js:35 wrapFn @ zone.js:1199 ZoneDelegate.invokeTask @ zone.js:398 Zone.runTask @ zone.js:165 ZoneTask.invoke @ zone.js:460

Do you know what did I missed? thanks. FYI: i'm using node v7.8.0, npm v4.2.0, @angular/cli: 1.0.0 to create angular app.

abreits commented 7 years ago

I am not sure where you use angular for, but amqp-ts is a server-side library and does not work in a browser. I do not understand the error message, to me it appears to be unrelated to amqp-ts.