ngx-slick语法错误:意外的令牌导入角度通用

时间:2018-10-04 16:10:49

标签: node.js angular angular-universal angular-seo

Ngx-slick显示以下错误:

node_modules\ngx-slick\index.js:1
(function (exports, require, module, __filename, __dirname) { import { Component, Directive, ElementRef, EventEmitter, Host, Input, NgModule, NgZone, Output, forwardRef } from '@angular/core';
                                                              ^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:607:28)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.ngx-slick (D:\dattatray\25o2\frontend\25o2_website\25o2_digital_ocean\universal-starter-master\dist\server\main.js:14620:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ng-universal-demo@0.0.0 serve:ssr: `node dist/server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ng-universal-demo@0.0.0 serve:ssr script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

在我的Node dist /服务器上,它显示了错误,但是在ng build上,它正在正确构建。

如何解决此问题?

0 个答案:

没有答案