【发布时间】:2019-01-30 11:40:14
【问题描述】:
当从另一个模块导入一个类时,编译器会给出这个错误,告诉我如何纠正它
(function (exports, require, module, __filename, __dirname) { import validator from './click.component';
^^^^^^^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:74:7)
at createScript (vm.js:246:10)
at Object.runInThisContext (vm.js:298:10)
at Module._compile
(internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions..js
(internal/modules/cjs/loader.js:700:10)
at Module.load
(internal/modules/cjs/loader.js:599:32)
at tryModuleLoad
(internal/modules/cjs/loader.js:538:12)
at Function.Module._load
(internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain
Blockquote 我该如何解决这个问题
(内部/模块/cjs/loader.js:742:12) 启动时
(内部/bootstrap/node.js:266:19)
【问题讨论】:
标签: angularjs node.js typescript