Issue #2899💬 AnsweredOpened July 16, 2020by TOM90ek0 reactions

Incorrect imports in main.scss (?)

快速解答by artf

Yeah there is an attempt to solve it here https://github.com/artf/grapesjs/pull/2859

Read full answer below ↓

Question

Version: ^0.16.17 Are you able to reproduce the bug from the demo? [ ] Yes [X] No

According to tutorial i want to override styles for my editor. https://grapesjs.com/docs/getting-started.html#theming But I cannot compile my project due to an error in main.scss:

       ^
      Can't find stylesheet to import.
  ╷
2 │ @import "../../../node_modules/spectrum-colorpicker/spectrum";
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  node_modules/grapesjs/src/styles/scss/main.scss 2:9      @import
  libs/content-builder/assets/scss/layout-editor.scss 2:9  @import
  stdin 1:9                                                root stylesheet

Are these imports correct? grapesjs/src/styles/scss/main.scss

@import "../../../node_modules/spectrum-colorpicker/spectrum";
@import "../../../node_modules/codemirror/lib/codemirror";
@import "../../../node_modules/codemirror/theme/hopscotch";
....

I think they should look like this:

@import "~spectrum-colorpicker/spectrum";
@import "~codemirror/lib/codemirror";
@import "~codemirror/theme/hopscotch";

Answers (1)

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.