我正在将foundation5升级到foundation6,并且在使用node-sass编译代码时出现以下错误
{ [Error: bower_components/foundation-sites/scss/grid/_grid.scss
Error: Undefined variable: "$global-width".
on line 11 of bower_components/foundation-sites/scss/grid/_grid.scss
>> $grid-row-width: $global-width !default;
-----------------^
]
formatted: 'Error: Undefined variable: "$global-width".\n on line 11 of bower_components/foundation-sites/scss/grid/_grid.scss\n>> $grid-row-width: $global-width !default;\n -----------------^\n',
message: 'bower_components/foundation-sites/scss/grid/_grid.scss\nError: Undefined variable: "$global-width".\n on line 11 of bower_components/foundation-sites/scss/grid/_grid.scss\n>> $grid-row-width: $global-width !default;\n -----------------^\n',
column: 18,
line: 11,
file: '/home/khine/Sandboxes/node-blade-boiler-template/bower_components/foundation-sites/scss/grid/_grid.scss',
status: 1,
messageFormatted: '\u001b[4mbower_components/foundation-sites/scss/grid/_grid.scss\u001b[24m\nError: Undefined variable: "$global-width".\n on line 11 of bower_components/foundation-sites/scss/grid/_grid.scss\n>> $grid-row-width: $global-width !default;\n -----------------^\n',
name: 'Error',
stack: 'Error: bower_components/foundation-sites/scss/grid/_grid.scss\nError: Undefined variable: "$global-width".\n on line 11 of bower_components/foundation-sites/scss/grid/_grid.scss\n>> $grid-row-width: $global-width !default;\n -----------------^\n\n at options.error (/home/khine/Sandboxes/node-blade-boiler-template/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:277:32)\n',
showStack: false,
showProperties: true,
plugin: 'gulp-sass' }
我在我的节点开发依赖项中运行最新的 node-sass 和 gulp-sass:
- "gulp-sass": "~2.1.1",
- “应该”:“^7.1.0”,
- “节点萨斯”:“〜3.4.2”
谷歌搜索错误返回http://foundation.zurb.com/forum/posts/36717-global-margin-undefined-only-for-buttons
$global-width 定义在bower_components/foundation-sites/scss/_global.scss
$global-width: rem-calc(1200) !default;
非常感谢任何建议。