Bootstrap 4 / dist重新编译

时间:2017-11-08 13:39:29

标签: twitter-bootstrap angular

我整天都在努力解决上面的问题。我有一个角度项目,由于ng-bootstrap功能,必须包含bootstrap 4。我还需要通过编辑_variables.scss来修改bootstrap样式。在bootstrap中,3个变量是较少的文件而不是scss,我可以通过运行命令生成“/ dist”文件夹文件:npm install和grunt dist。为了在v4中做同样的事情,我遵循了这条指令:https://getbootstrap.com/docs/4.0/getting-started/build-tools/

不幸的是,除了我完成了教学的每一部分,我在运行'npm run dist'后仍然出错:

> bootstrap@4.0.0-beta.2 dist C:\Users\azbest\Documents\WebDevelop\Angular\portfolio\node_modules\bootstrap
> npm-run-all --parallel css js


> bootstrap@4.0.0-beta.2 css C:\Users\azbest\Documents\WebDevelop\Angular\portfolio\node_modules\bootstrap
> npm-run-all --parallel css-lint* css-compile* --sequential css-prefix* css-minify*


> bootstrap@4.0.0-beta.2 js C:\Users\azbest\Documents\WebDevelop\Angular\portfolio\node_modules\bootstrap
> npm-run-all js-lint* js-compile* js-minify*


> bootstrap@4.0.0-beta.2 css-compile C:\Users\azbest\Documents\WebDevelop\Angular\portfolio\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-cont
ents 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/b
ootstrap-reboot.css


> bootstrap@4.0.0-beta.2 css-lint C:\Users\azbest\Documents\WebDevelop\Angular\portfolio\node_modules\bootstrap
> stylelint --config build/.stylelintrc --syntax scss "scss/**/*.scss"


> bootstrap@4.0.0-beta.2 css-compile-docs C:\Users\azbest\Documents\WebDevelop\Angular\portfolio\node_modules\bootstrap
> node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 assets/scss/docs.scss assets/css/docs.min.css


> bootstrap@4.0.0-beta.2 js-lint C:\Users\azbest\Documents\WebDevelop\Angular\portfolio\node_modules\bootstrap
> eslint js/ && eslint --config js/tests/.eslintrc.json --env node build/


> bootstrap@4.0.0-beta.2 css-lint-docs C:\Users\azbest\Documents\WebDevelop\Angular\portfolio\node_modules\bootstrap
> stylelint --config build/.stylelintrc --syntax scss "assets/scss/*.scss" && stylelint --config docs/4.0/examples/.stylelintrc "docs/**/*.css"

An output directory must be specified when compiling a directory
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap@4.0.0-beta.2 css-compile-docs: `node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 assets/scss/docs.scss assets/css/docs.min.css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap@4.0.0-beta.2 css-compile-docs 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\azbest\AppData\Roaming\npm-cache\_logs\2017-11-08T13_02_57_252Z-debug.log
{
  "status": 1,
  "file": "C:/Users/azbest/Documents/WebDevelop/Angular/portfolio/node_modules/bootstrap/scss/_root.scss",
  "line": 3,
  "column": 27,
  "message": "Undefined variable: \"$colors\".",
  "formatted": "Error: Undefined variable: \"$colors\".\n        on line 3 of scss/_root.scss\n>>   @each $color, $value in $colors {\n   --------------------------^\n"
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap@4.0.0-beta.2 css-compile: `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 --preci
sion 6 scss/bootstrap-reboot.scss dist/css/bootstrap-reboot.css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap@4.0.0-beta.2 css-compile 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\azbest\AppData\Roaming\npm-cache\_logs\2017-11-08T13_02_57_576Z-debug.log
ERROR: "css-compile-docs" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap@4.0.0-beta.2 css: `npm-run-all --parallel css-lint* css-compile* --sequential css-prefix* css-minify*`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap@4.0.0-beta.2 css 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\azbest\AppData\Roaming\npm-cache\_logs\2017-11-08T13_02_58_845Z-debug.log
ERROR: "css" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap@4.0.0-beta.2 dist: `npm-run-all --parallel css js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap@4.0.0-beta.2 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!     C:\Users\azbest\AppData\Roaming\npm-cache\_logs\2017-11-08T13_02_59_207Z-debug.log

感谢您的帮助

0 个答案:

没有答案