webcat12345 / ngx-ui-switch

Angular UI Switch component
https://webcat12345.github.io/ngx-ui-switch/demo/
MIT License
111 stars 68 forks source link

Error: Cannot find module 'ngx-ui-switch/src' in angular-cli with angular universal #62

Closed Sathishchary closed 7 years ago

Sathishchary commented 7 years ago

Its working with angular cli, but after converting my project to angular cli with angular universal. its showing the error Error: Cannot find module 'ngx-ui-switch/src'

    throw err;
    ^
   Error: Cannot find module 'ngx-ui-switch/src'
    at Function.Module._resolveFilename (module.js:469:15)

using : "ngx-ui-switch": "^1.3.5", import { UiSwitchModule } from 'ngx-ui-switch/src'; @NgModule({ imports: [UiSwitchModule] ...... })

JustinSchneider commented 7 years ago

I'm getting the same or very similar error using Angular-CLI:

ERROR in C:/Projects/FormsDesigner/src/app/app.module.ts (10,32): Cannot find module 'ngx-ui-switch/src'.

ERROR in Error encountered resolving symbol values statically. Could not resolve ngx-ui-switch/src relative to C:/Projec ts/FormsDesigner/src/app/app.module.ts., resolving symbol AppModule in C:/Projects/FormsDesigner/src/app/app.module.ts, resolving symbol AppModule in C:/Projects/FormsDesigner/src/app/app.module.ts

ERROR in C:/Projects/FormsDesigner/src/app/app.module.ts (10,32): Cannot find module 'ngx-ui-switch/src'.

ERROR in ./src/app/app.module.ts Module not found: Error: Can't resolve 'ngx-ui-switch/src' in 'C:\Projects\FormsDesigner\src\app' @ ./src/app/app.module.ts 16:0-51 @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

It's also worth mentioning that I can't seem to install via NPM, as mentioned in this issue, even using an old version that was working previously.

webcat12345 commented 7 years ago

Currently its not supporting angular universal. Closing issue.