- Notifications
You must be signed in to change notification settings - Fork 314
ionic:serve incompatibility with bufferutil@3.0.2 and utf-8-validate@1.0.4 dependencies #1251
Description
Description of the problem:
The @ionic/app-scripts include the "ws" dependency, this dependency probably enters in conflict with the "bufferutil" and "utf-8-validate" included by openvidu-browser. When the app its serve to the browser and the "hot reloading" its trigger, it exits with error:
D:\Desarrollo\Proyectos-Personales\Codigo\Ionic-Projects\electron-openvidu\node_modules\ws\lib\Receiver.js:306
if (mask != null && buf != null) bufferUtil.unmask(buf, mask);
^
TypeError: Cannot read property 'unmask' of undefined
at Receiver.unmask (D:\Desarrollo\Proyectos-Personales\Codigo\Ionic-Projects\electron-openvidu\node_modules\ws\lib\Receiver.js:306:46)
at Receiver.finish (D:\Desarrollo\Proyectos-Personales\Codigo\Ionic-Projects\electron-openvidu\node_modules\ws\lib\Receiver.js:505:25)
at Receiver.expectHandler (D:\Desarrollo\Proyectos-Personales\Codigo\Ionic-Projects\electron-openvidu\node_modules\ws\lib\Receiver.js:493:33)
at Receiver.add (D:\Desarrollo\Proyectos-Personales\Codigo\Ionic-Projects\electron-openvidu\node_modules\ws\lib\Receiver.js:103:24)
at Socket.realHandler (D:\Desarrollo\Proyectos-Personales\Codigo\Ionic-Projects\electron-openvidu\node_modules\ws\lib\WebSocket.js:825:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:547:20)
Steps to reproduce?
- Started a new black project
- Then update dependencies to include electron and openvidu-browser:
This is the package.json
{ "name": "ion-electron-test", "version": "0.0.1", "private": true, "scripts": { "clean": "ionic-app-scripts clean", "build": "ionic-app-scripts build", "lint": "ionic-app-scripts lint", "ionic:build": "ionic-app-scripts build", "ionic:serve": "ionic-app-scripts serve", "dev": "nf start", "electron-dist": "electron .", "ebuild": "npm run build && build --win --x64", "launch": "electron .", "package": "build --win --x64", }, "dependencies": { "@angular/common": "4.1.3", "@angular/compiler": "4.1.3", "@angular/compiler-cli": "4.1.3", "@angular/core": "4.1.3", "@angular/forms": "4.1.3", "@angular/http": "4.1.3", "@angular/platform-browser": "4.1.3", "@angular/platform-browser-dynamic": "4.1.3", "@ionic-native/camera": "3.12.1", "@ionic-native/core": "3.12.1", "@ionic-native/splash-screen": "3.12.1", "@ionic-native/status-bar": "3.12.1", "@ionic/storage": "2.0.1", "@ngrx/core": "^1.2.0", "@ngrx/effects": "^4.0.1", "@ngrx/store": "^4.0.0", "@ngrx/store-devtools": "^4.0.0", "@ngx-translate/core": "6.0.1", "@ngx-translate/http-loader": "0.0.3", "core-js": "^2.5.1", "hark": "^1.1.6", "ionic-angular": "3.6.1", "ionicons": "3.0.0", "moment": "^2.18.1", "openvidu-browser": "1.1.0", "rxjs": "5.4.0", "sw-toolbox": "3.6.0", "tassign": "^1.0.0", "zone.js": "0.8.12" }, "devDependencies": { "@ionic/app-scripts": "2.1.4", "@types/electron": "^1.6.10", "electron": "1.7.8", "electron-builder": "19.31.1", "foreman": "^2.0.0", "typescript": "2.3.4" }, "author": { "email": "dbarrios1907@gmail.com" }, "description": "test" } }
- yarn install and (npm run ionic:serve or ionic serve)
**Version @ionic/app-scripts **
"@ionic/app-scripts": "2.1.4",