我正在关注2个使用web worker创建应用程序的引用。 https://blog.angularindepth.com/angular-with-web-workers-step-by-step-dc11d5872135
但是得到这个错误可以有人帮助我
ERROR in ./src/main.ts
Module build failed: F:\learning 2017\angularcli\angular-cli-master\angular-cli-master\packages\@ngtools\webpack\src\index.ts:2
import { satisfies } from 'semver';
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at loadLoader (F:\learning 2017\app\learning\webworker\ngwebworker\node_modules\loader-runner\lib\loadLoader.js:13:17)
at iteratePitchingLoaders (F:\learning 2017\app\learning\webworker\ngwebworker\node_modules\loader-runner\lib\LoaderRunner.js:169:2)
at runLoaders (F:\learning 2017\app\learning\webworker\ngwebworker\node_modules\loader-runner\lib\LoaderRunner.js:362:2)
at NormalModule.doBuild (F:\learning 2017\app\learning\webworker\ngwebworker\node_modules\webpack\lib\NormalModule.js:182:3)
at NormalModule.build (F:\learning 2017\app\learning\webworker\ngwebworker\node_modules\webpack\lib\NormalModule.js:275:15)
at Compilation.buildModule (F:\learning 2017\app\learning\webworker\ngwebworker\node_modules\webpack\lib\Compilation.js:151:10)
at factoryCallback (F:\learning 2017\app\learning\webworker\ngwebworker\node_modules\webpack\lib\Compilation.js:344:12)
at factory (F:\learning 2017\app\learning\webworker\ngwebworker\node_modules\webpack\lib\NormalModuleFactory.js:241:5)
@ multi (webpack)-dev-server/client?http://localhost:4200 ./src/main.ts
ERROR in ./src/polyfills.ts
Module build failed: F:\learning 2017\angularcli\angular-cli-master\angular-cli-master\packages\@ngtools\webpack\src\index.ts:2
import { satisfies } from 'semver';
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:76:16)