You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone,
recently I started to work with updating Lerna from version 3.22.1 to 8.1.2 in our solution. In Lerna documentation I read that I should use package manager workspaces (npm in my case).
First I tried it with some "blank" solution and even there I'm still facing issues with imports in scss file:
file path: Monorepo.Poc/Solution1/src/helloWorld/components/HelloWorls.module.scss
error:
Error - sass - src\webparts\helloWorld\components\HelloWorld.module.scss(1,9): error Error: Can't find stylesheet to import.
╷
1 │ @import '~@fluentui/react/dist/sass/References.scss';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
src\webparts\helloWorld\components\HelloWorld.module.scss 1:9 root stylesheet
Error - 'sass' sub task errored after 167 ms
Can't find stylesheet to import.
╷
1 │ @import '~@fluentui/react/dist/sass/References.scss';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
src\webparts\helloWorld\components\HelloWorld.module.scss 1:9 root stylesheet
On npm github I was told that problem should be handled by build tool. Can lerna handle problems with importing css?
Steps To Reproduce
Create project folder (Monorepo.Poc)
Create solution folder (Solution1)
Generate spfx webpart solution in folder Solution1 (with yo @microsoft/sharepoint cmd)
What is your solution name? (solution-1) - press enter
Which type of client-side component to create? (Use arrow keys) - select WebPart and press enter
WebPart
Extension
Library
Adaptive Card Extension
What is your Web part name? (HelloWorld) - press enter
Which template would you like to use? - select React and press enter
Minimal
No framework
React
In parent folder (Monorepo.Poc) create package.json file with content:
run cmd npm run build --workspaces in folder Monorepo.Poc
Environment
npm: 9.6.7
Node.js: v18.17.1
Spfx: 1.18.2
OS Name: Windows 10
npm config:
; "user" config from C:\Users\xx\.npmrchttps-proxy = "http://185.155.56.70:65432"proxy = "http://185.155.56.70:65432"strict-ssl = false
; node bin location = C:\Program Files\nodejs\node.exe; node version = v18.17.1; npm local prefix = C:\Users\xx\source\repos\Monorepo.Poc; npm version = 9.6.7; cwd = C:\Users\xx\source\repos\Monorepo.Poc; HOME = C:\Users\xx; Run `npm config ls -l` to show all defaults.
Am I doing something wrong or whats the catch there?
Thanks for your answers in advance
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
recently I started to work with updating Lerna from version 3.22.1 to 8.1.2 in our solution. In Lerna documentation I read that I should use package manager workspaces (npm in my case).
First I tried it with some "blank" solution and even there I'm still facing issues with imports in scss file:
file path: Monorepo.Poc/Solution1/src/helloWorld/components/HelloWorls.module.scss
error:
On npm github I was told that problem should be handled by build tool. Can lerna handle problems with importing css?
Steps To Reproduce
What is your solution name? (solution-1) - press enter
Which type of client-side component to create? (Use arrow keys) - select WebPart and press enter
What is your Web part name? (HelloWorld) - press enter
Which template would you like to use? - select React and press enter
npm install
in folder Monorepo.Pocnpm run build --workspaces
in folder Monorepo.PocEnvironment
Am I doing something wrong or whats the catch there?
Thanks for your answers in advance
Beta Was this translation helpful? Give feedback.
All reactions