Skip to content

🐞 Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe. #1110

@michel-weber

Description

@michel-weber

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

A newly created SPFx WebPart (@microsoft/generator-sharepoint@1.3.4, React) should build without warnings.

Observed Behavior

The gulp build --ship command emits a warning. This breaks the build on VSTS as gulp is returning with an exit code of 1.

##[section]Starting: gulp build --ship
==============================================================================
Task         : Gulp
Description  : Node.js streaming task based build system
Version      : 0.5.31
Author       : Microsoft Corporation
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613721)
==============================================================================
[command]C:\NPM\Modules\gulp.cmd build --gulpfile d:\a\1\s\spfx\gulpfile.js --ship
Build target: SHIP
[14:11:59] Using gulpfile d:\a\1\s\spfx\gulpfile.js
[14:11:59] Starting gulp
[14:11:59] Starting 'build'...
[14:11:59] Starting subtask 'configure-sp-build-rig'...
[14:11:59] Finished subtask 'configure-sp-build-rig' after 5.82 ms
[14:11:59] Starting subtask 'pre-copy'...
[14:11:59] Finished subtask 'pre-copy' after 5.88 ms
[14:11:59] Starting subtask 'copy-static-assets'...
[14:11:59] Starting subtask 'sass'...
- Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.
[14:12:00] Finished subtask 'sass' after 910 ms
[14:12:00] Starting subtask 'tslint'...
[14:12:01] Starting subtask 'typescript'...
[14:12:01] [typescript] TypeScript version: 2.4.2
[14:12:01] Finished subtask 'copy-static-assets' after 1.86 s
[14:12:01] Finished subtask 'tslint' after 1.42 s
[14:12:04] Finished subtask 'typescript' after 2.95 s
[14:12:04] Starting subtask 'ts-npm-lint'...
[14:12:04] Finished subtask 'ts-npm-lint' after 25 ms
[14:12:04] Starting subtask 'api-extractor'...
[14:12:04] Finished subtask 'api-extractor' after 658 μs
[14:12:04] Starting subtask 'post-copy'...
[14:12:04] Finished subtask 'post-copy' after 144 μs
[14:12:04] Finished 'build' after 4.83 s
[14:12:04] ==================[ Finished ]==================
- Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.
[14:12:05] Project sbb-gamo version: 0.0.1
[14:12:05] Build tools version: 3.0.5
[14:12:05] Node version: v6.10.0
[14:12:05] Total duration: 7.73 s
[14:12:05] Task warnings: 1
- ##[error]Gulp failed with error: C:\NPM\Modules\gulp.cmd failed with return code: 1
##[section]Finishing: gulp build --ship

Steps to Reproduce

  1. Create a new SPFx WebPart with React:
λ yo @microsoft/sharepoint

     _-----_
    |       |    .--------------------------.
    |--(o)--|    |      Welcome to the      |
   `---------´   |  SharePoint Client-side  |
    ( _´U`_ )    |    Solution Generator    |
    /___A___\    '--------------------------'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

Let's create a new SharePoint solution.
? What is your solution name? test-todelete
? Which baseline packages do you want to target for your component(s)? SharePoint Online only (latest)
? Where do you want to place the files? Use the current folder
? Do you want to allow the tenant admin the choice of being able to deploy the solution to all sites immediately without running any feature deployment or
adding apps in sites? No
? Which type of client-side component to create? WebPart
? What is your Web part name? HelloWorld
? What is your Web part description? HelloWorld description
? Which framework would you like to use? React
  1. Run gulp build --ship

Thoughts

I see at least two scenarios how I could solve this:

  1. Tell gulp to ignore warnings (or not fail on warnings)
  2. Do not use Office UI Fabric (e.g. Bootstrap)

Any help is greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:fixedIssue was fixed in current or prior release.status:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions