@types/chrome

Hello everyone and thanks a lot for your answers.

Ionic version:
[ ] 1.x
[x] 2.x

Current behavior:

Update project to to RC2.
I’m using chrome plugin to connect via tcpServer to a sensor. Changing typings.json to @types in node_modules everything is ok, but running the app in Android i got this error.
image
Expected behavior: The app should run normally

Steps to reproduce:
npm install @types/chrome --save-dev --save-exact in my project

Related code:
image
`chrome.sockets.tcpServer.onAccept.addListener ((info) => {
console.log ("[TCP] Connection accepted: “, info.clientSocketId);
// Unpause socket to start receiving data
chrome.sockets.tcp.setPaused (info.clientSocketId, false, () => console.log (”[TCP] Can now receive data from client " + info.clientSocketId));
// Save client socket id
this._clientSocketId = info.clientSocketId;

https://www.npmjs.com/package/@types/chrome

Those types are for chrome extensions and run in a different context than the browser.

Hello Mike,
Thank you for your answer. The point is that it was working perfect before upgrading to RC2… :frowning:

Finally we solved the problem copying the corresponding node_module files in the new project and changing the Typescript reference paths inside them. But the point now is we cannot remove the node_modules folder and execute npm install because it will broke again. Any suggestion?

Thanks a lot.