tb / ng2-nouislider

Angular2 noUiSlider directive
http://tb.github.io/ng2-nouislider/
MIT License
184 stars 114 forks source link

Universal Angular 4: getting SyntaxError: Unexpected token import #138

Closed kellton6075 closed 6 years ago

kellton6075 commented 6 years ago

I am working on Universal Angular 4 project.

while adding "nouislider" in html file,i am getting the following error

import * as i0 from 'angular/core'; ^^^^^^

SyntaxError: Unexpected token import at createScript (vm.js:74:10) at Object.runInThisContext (vm.js:116:10) at Module._compile (module.js:533:28) at Module._extensions..js (module.js:580:10) at Object.require.extensions.(anonymous function) [as .ts] (/home/user/Desktop/node_modules/ts-node/src/index.ts:384:14) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) at Module.require (module.js:513:17) at require (internal/module.js:11:18)

slider is working fine when i am working on angular 4 only i.e without server side rendering(SSR) but getting above error when doing SSR.

tb commented 6 years ago

Fixed in 1.7.6

kellton6075 commented 6 years ago

I have upgraded it to version 1.7.6,but still i am getting the same error.