triniwiz/nativescript-socketio

Error: Can't resolve '../socketio' in ./node_modules/nativescript-socketio/angular/index.js

Closed this issue · 1 comments

Error: Failed to compile.

./node_modules/nativescript-socketio/angular/index.js
Module not found: Error: Can't resolve '../socketio' in '/Users/yahuiqin/workspace/nirvana/warrior/warriortrading.hermes.frontend/node_modules/nativescript-socketio/angular'

Has anyone ever had this problem? Need help.

I encounter the same issue. My environment is as following:

Angular CLI: 6.1.1
Node: 8.9.4
OS: darwin x64
Angular: 6.1.10
... animations, common, compiler, core, forms, http
... platform-browser, platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.8.7
@angular-devkit/build-angular 0.8.7
@angular-devkit/build-optimizer 0.8.7
@angular-devkit/build-webpack 0.8.7
@angular-devkit/core 0.8.7
@angular-devkit/schematics 0.7.1
@angular/cli 6.1.1
@angular/compiler-cli 6.0.9
@ngtools/webpack 6.2.7
@schematics/angular 0.7.1
@schematics/update 0.7.1
rxjs 6.3.3
typescript 2.7.2
webpack 4.16.4

Fixed this issue by adding a file named socketio.js under the root.

"use strict";
function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./socketio.android"));
//# sourceMappingURL=index.js.map