ModernHillbillyTabs icon indicating copy to clipboard operation
ModernHillbillyTabs copied to clipboard

error TS2307: Cannot find module './ModernHillbillyTabsWebPart.module.scss'.

Open relugas opened this issue 6 years ago • 1 comments

Hi,

I'm trying to build the ModernHillbillyTabsWebPart from this repo and getting the following build error when trying to do a gulp serve:

Error - typescript - src\webparts\modernHillbillyTabs\ModernHillbillyTabsWebPart.ts(11,20): error TS2307: Cannot find module './ModernHillbillyTabsWebPart.module.scss'.

When viewing the ModernHillbillyTabsWebPart.ts file in vscode it reports the following error for line 11: import styles from './ModernHillbillyTabsWebPart.module.scss';

[ts] 'styles' is declared but its value is never read. [ts] Cannot find module './ModernHillbillyTabsWebPart.module.scss'.

Do you have any advice that could help get me past this error?

Many thanks, James.

relugas avatar Nov 20 '18 14:11 relugas

Looks like the issue was caused by the ModernHillbillyTabsWebPart.module.scss contained an empty ruleset according the error:

[scss.lint.emptyRules] Do not use empty rulesets

I added in a random css property and the solution proceeded to build correctly.

.modernHillbillyTabs {
  .modernHillbillyContainer {
    color: aqua;
  }
}

relugas avatar Nov 20 '18 15:11 relugas