来自源的Bootstrap 4:“ npm run dist”引发错误

时间:2018-08-21 02:35:05

标签: bootstrap-4

我正在尝试从源代码进行编译,并且已成功完成了官方说明中的所有内容,但当我执行“ npm run dist”时,它会炸毁我,引发很多错误,从js-中的一个开始皮棉。有人知道会发生什么吗?

这是我遵循的内容:https://getbootstrap.com/docs/4.1/getting-started/build-tools/#tooling-setup

这是在OSX 10.12.3上

节点v8.9.4

NPM 6.4.0

    npm run dist

    > bootstrap@4.1.3 dist /Users/me/Desktop/bootstrap 4 test 2/node_modules/bootstrap
    > npm-run-all --parallel css-main js


    > bootstrap@4.1.3 css-main /Users/me/Desktop/bootstrap 4 test 2/node_modules/bootstrap
    > npm-run-all --parallel css-lint css-compile --sequential css-prefix css-minify css-copy


    > bootstrap@4.1.3 js /Users/me/Desktop/bootstrap 4 test 2/node_modules/bootstrap
    > npm-run-all js-lint* js-compile js-minify js-copy


    > bootstrap@4.1.3 css-compile /Users/me/Desktop/bootstrap 4 test 2/node_modules/bootstrap
    > node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap.scss dist/css/bootstrap.css && node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap-grid.scss dist/css/bootstrap-grid.css && node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap-reboot.scss dist/css/bootstrap-reboot.css


    > bootstrap@4.1.3 js-lint /Users/me/Desktop/bootstrap 4 test 2/node_modules/bootstrap
    > eslint js/src js/tests build/


    > bootstrap@4.1.3 css-lint /Users/me/Desktop/bootstrap 4 test 2/node_modules/bootstrap
    > stylelint --syntax scss "scss/**/*.scss"


    Oops! Something went wrong! :(

    ESLint: 5.4.0.
    No files matching the pattern "js/tests" were found.
    Please check for typing mistakes in the pattern.

    npm ERR! code ELIFECYCLE
    npm ERR! errno 2
    npm ERR! bootstrap@4.1.3 js-lint: `eslint js/src js/tests build/`
    npm ERR! Exit status 2
    npm ERR! 
    npm ERR! Failed at the bootstrap@4.1.3 js-lint 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!     /Users/me/.npm/_logs/2018-08-20T22_08_53_067Z-debug.log
    ERROR: "js-lint" exited with 2.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! bootstrap@4.1.3 js: `npm-run-all js-lint* js-compile js-minify js-copy`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the bootstrap@4.1.3 js 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!     /Users/me/.npm/_logs/2018-08-20T22_08_53_093Z-debug.log
    ERROR: "js" exited with 1.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! bootstrap@4.1.3 dist: `npm-run-all --parallel css-main js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the bootstrap@4.1.3 dist 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!     /Users/me/.npm/_logs/2018-08-20T22_08_53_179Z-debug.log

1 个答案:

答案 0 :(得分:1)

要从源代码进行编译,您应该克隆我们的存储库或通过Github下载它。

对于我们的最新版本:https://github.com/twbs/bootstrap/tree/v4.1.3

您不能使用我们共享的内容来编译Bootstrap,因为我们只共享那些不想自己编译Bootstrap的人所需的内容