Ошибка при создании ngx-bootstrap

Я сделал клон проекта git-hub ngx-bootstrap и следовал инструкциям по сборке, но всегда получаю ошибку.

Инструкции по сборке:

Первый раз

клонировать репозиторий

npm install

npm запустить тест

Вывод:

> [email protected] pretest C:\Git\ngx-bootstrap
> run-s lint build link


> [email protected] lint C:\Git\ngx-bootstrap
> exit 0


> [email protected] build C:\Git\ngx-bootstrap
> run-s build.ngm build.sass build.es2015


> [email protected] build.ngm C:\Git\ngx-bootstrap
> ngm build -p src --clean

[13:23:44] Clean dist folders [started]
[13:23:44] Cleaning dist [started]
[13:23:44] Cleaning dist [completed]
[13:23:44] Clean dist folders [completed]
[13:23:44] Copy *.md and license files [started]
[13:23:44] Copy *.md and license files [completed]
[13:23:44] Build package.json files [started]
[13:23:44] Build package.json files [completed]
[13:23:44] Copy source files to temporary folder [started]
[13:23:44] Copying ngx-bootstrap source files to src [started]
[13:23:45] Copying ngx-bootstrap source files to src [completed]
[13:23:45] Copy source files to temporary folder [completed]
[13:23:45] Inline template and style files into the components [started]
[13:23:45] Inlining ngx-bootstrap templates and styles [started]
[13:23:45] Inlining ngx-bootstrap templates and styles [completed]
[13:23:45] Inline template and style files into the components [completed]
[13:23:45] Build projects [started]
[13:23:45] Building ngx-bootstrap (src) [started]
[13:23:55] Building ngx-bootstrap (src) [completed]
[13:23:55] Build projects [completed]
[13:23:55] Copy assets to dist folder [started]
[13:23:55] Copy assets to dist folder [skipped]
[13:23:55] Bundling umd version [started]
[13:23:55] Bundling ngx-bootstrap [started]
 10% building modules 0/1 modules 1 active ...-0!C:\Git\ngx-bootstrap\.tmp\index.ts
[at-loader] Using [email protected] from typescript and "tsconfig.json" from C:\Git\ngx-bootstrap\src\tsconfig.json.
                                     [13:24:03] Bundling ngx-bootstrap [completed]
[13:24:03] Bundling umd version [completed]
[13:24:03] Bundling minified umd version [started]
[13:24:03] Bundling ngx-bootstrap [started]
 10% building modules 0/1 modules 1 active ...-0!C:\Git\ngx-bootstrap\.tmp\index.ts
[at-loader] Using [email protected] from typescript and "tsconfig.json" from C:\Git\ngx-bootstrap\src\tsconfig.json.
                                     [13:24:13] Bundling ngx-bootstrap [completed]
[13:24:13] Bundling minified umd version [completed]
[13:24:13] Clean .tmp folders [started]
[13:24:13] Cleaning C:\Git\ngx-bootstrap\.tmp [started]
[13:24:13] Cleaning C:\Git\ngx-bootstrap\.tmp [completed]
[13:24:13] Clean .tmp folders [completed]

-------------------------------------


> [email protected] build.sass C:\Git\ngx-bootstrap
> node-sass --recursive src --output dist --source-map true --source-map-contents sass

Rendering Complete, saving .css file...
Wrote Source Map to C:\Git\ngx-bootstrap\dist\datepicker\bs-datepicker.css.map
Wrote CSS to C:\Git\ngx-bootstrap\dist\datepicker\bs-datepicker.css
Rendering Complete, saving .css file...
Wrote Source Map to C:\Git\ngx-bootstrap\dist\datepicker\utils\scss\mixins.css.map
Wrote CSS to C:\Git\ngx-bootstrap\dist\datepicker\utils\scss\mixins.css
Rendering Complete, saving .css file...
Wrote Source Map to C:\Git\ngx-bootstrap\dist\datepicker\utils\scss\variables.css.map
Wrote CSS to C:\Git\ngx-bootstrap\dist\datepicker\utils\scss\variables.css
Wrote 3 CSS files to C:\Git\ngx-bootstrap\dist

> [email protected] build.es2015 C:\Git\ngx-bootstrap
> node ./scripts/es2015/bundle.es2015.js

C:\Git\ngx-bootstrap\scripts\es2015\bundle.es2015.js:12
async function createEs2015Bundle() {
      ^^^^^^^^
SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    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.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build.es2015: `node ./scripts/es2015/bundle.es2015.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build.es2015 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\paulo.larini\AppData\Roaming\npm-cache\_logs\2018-01-17T15_24_15_461Z-debug.log
ERROR: "build.es2015" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `run-s build.ngm build.sass build.es2015`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\paulo.larini\AppData\Roaming\npm-cache\_logs\2018-01-17T15_24_15_497Z-debug.log
ERROR: "build" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] pretest: `run-s lint build link`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] pretest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\paulo.larini\AppData\Roaming\npm-cache\_logs\2018-01-17T15_24_15_540Z-debug.log

Что случилось ?


person Beetlejuice    schedule 17.01.2018    source источник


Ответы (1)


Возможно, вы используете версию Node.JS, которая не поддерживает async / await, пожалуйста, обновите Node.JS до 8+

person IlyaSurmay    schedule 18.01.2018