carbon-design-system / carbon

A design system built by IBM
https://www.carbondesignsystem.com
Apache License 2.0
7.87k stars 1.82k forks source link

Carbon build is not working #16963

Closed sreelekhaa closed 3 months ago

sreelekhaa commented 4 months ago

Hi!

I'm trying to install the carbon-design-system/carbon package and I'm facing this issue. Has anyone seen this before? Thank you

Discussed in https://github.com/carbon-design-system/carbon/discussions/15418

Originally posted by **raphyluke** December 18, 2023 Hello everyone ! I actually don't know if it's normal or not so I prefer to create discussion instead of issue at first. I followed fully the contribution guide to build carbon. The problem is that when I try to build it I have an error at a moment : ``` > @carbon/grid:build @carbon/colors: check ▐ ┏ check @carbon/colors: check ▐ ┣ Running in: D:\open source\carbon\packages\colors @carbon/colors: check ▐ ┣ Checking pattern: 'scss/*.scss', ignoring: '' @carbon/colors: check ▐ ┣ Compiling 0 files... @carbon/colors: check ▐ ┣ Successfully compiled 0 files! 🎉 @carbon/colors: check ▐ ┗ Done in 0.01s @carbon/grid: inline ▐ ┏ inline @carbon/grid: inline ▐ ┣ Inlining sass dependencies @carbon/grid: Error: No files match the pattern: D:\open source\carbon\packages\grid\scss\_inlined\_breakpoint.scss @carbon/grid: at D:\open source\carbon\node_modules\replace-in-file\lib\helpers\glob-async.js:27:23 @carbon/grid: at f (D:\open source\carbon\node_modules\once\once.js:25:25)@carbon/grid: at Glob. (D:\open source\carbon\node_modules\replace-in-file\node_modules\glob\glob.js:148:7) @carbon/grid: at Glob.emit (node:events:514:28) @carbon/grid: at Glob._finish (D:\open source\carbon\node_modules\replace-in-file\node_modules\glob\glob.js:194:8) @carbon/grid: at done (D:\open source\carbon\node_modules\replace-in-file\node_modules\glob\glob.js:179:14) @carbon/grid: at Glob._processSimple2 (D:\open source\carbon\node_modules\replace-in-file\node_modules\glob\glob.js:688:12) @carbon/grid: at D:\open source\carbon\node_modules\replace-in-file\node_modules\glob\glob.js:676:10 @carbon/grid: at Glob._stat2 (D:\open source\carbon\node_modules\replace-in-file\node_modules\glob\glob.js:772:12) @carbon/grid: at lstatcb_ (D:\open source\carbon\node_modules\replace-in-file\node_modules\glob\glob.js:764:12) @carbon/icon-helpers: bundle ▐ ┗ Done in 6.50s ———————————————————————————————————————————————————————————————————————————— > Lerna (powered by Nx) Running target build for 28 projects failed Tasks not run because their dependencies failed or --nx-bail=true: - class-prefix:build - custom-theme:build - id-prefix:build - incremental-migration-vite:build - examples-light-dark:build - examples-nextjs:build - v10-token-compat-in-v11:build - vite:build - carbon-components:build - carbon-components-react:build - @carbon/elements:build - @carbon/icons:build - @carbon/icons-react:build - @carbon/icons-vue:build - @carbon/pictograms:build - @carbon/pictograms-react:build - @carbon/themes:build - @carbon/type:build Failed tasks: - @carbon/grid:build ``` I didn't touch anything in the code, I just forked, installed and tried to build Is it normal ? Is it a mistake from me ? If someone can explain and say to me the solution, it will be appreciable, thank you :)
sreelekhaa commented 4 months ago

I fixed this issue by replacing @forward '${file.importPath}' with @forward '${file.importPath.replace(/\\/g, '/')}' in the build-styles.js files. The build process fails at carbon-cli inline in the build command specified in packages/grid/package.json. However, it works fine when carbon-cli inline is removed.

tay1orjones commented 3 months ago

@sreelekhaa could you share more about your environment? Platform, node version, shell, etc.? Our team can't repro this

sakarthapa1 commented 3 weeks ago

@tay1orjones

I am also facing exact same issue:

Following are environment details: Windows 11, yarn --version 4.5.0

{ carbon: '0.0.0', npm: '10.2.4', node: '20.11.0', acorn: '8.11.2', ada: '2.7.4', ares: '1.20.1', base64: '0.5.1', brotli: '1.0.9', cjs_module_lexer: '1.2.2', cldr: '43.1', icu: '73.2', llhttp: '8.1.1', modules: '115', napi: '9', nghttp2: '1.58.0', nghttp3: '0.7.0', ngtcp2: '0.8.1', openssl: '3.0.12+quic', simdutf: '4.0.4', tz: '2023c', undici: '5.27.2', unicode: '15.0', uv: '1.46.0', uvwasi: '0.0.19', v8: '11.3.244.8-node.17', zlib: '1.2.13.1-motley-5daffc7' }