Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failing after update to 1.14.4 #252

Closed
sidharthv96 opened this issue Oct 17, 2021 · 11 comments
Closed

Build failing after update to 1.14.4 #252

sidharthv96 opened this issue Oct 17, 2021 · 11 comments
Assignees

Comments

@sidharthv96
Copy link

sidharthv96 commented Oct 17, 2021

Issue is persisting in 1.14.5 also.

Code: https://github.com/mermaid-js/mermaid-live-editor/blob/1f4f4a94a371ac08e90f4b2d52d56533a1a1a99d/src/app.postcss#L1-L10

Complete logs: https://github.com/mermaid-js/mermaid-live-editor/runs/3917211510?check_suite_focus=true

$ svelte-kit build
vite v2.6.7 building for production...
(node:1963) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/runner/work/mermaid-live-editor/mermaid-live-editor/node_modules/chai/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
transforming...

warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.

🌼 daisyUI components 1.14.5  https://github.com/saadeghi/daisyui
  ✔︎ Including:  base, components, themes[21], utilities
  

🌼 daisyUI components 1.14.5  https://github.com/saadeghi/daisyui
  ✔︎ Including:  base, components, themes[21], utilities
  
✓ 57 modules transformed.
[vite:css] Cannot read properties of undefined (reading '5')
file: /home/runner/work/mermaid-live-editor/mermaid-live-editor/src/app.postcss
> Cannot read properties of undefined (reading '5')
TypeError: Cannot read properties of undefined (reading '5')
    at Parser.parentheses (/home/runner/work/mermaid-live-editor/mermaid-live-editor/node_modules/postcss-selector-parser/dist/parser.js:859:65)
    at Parser.parse (/home/runner/work/mermaid-live-editor/mermaid-live-editor/node_modules/postcss-selector-parser/dist/parser.js:1058:14)
    at Parser.loop (/home/runner/work/mermaid-live-editor/mermaid-live-editor/node_modules/postcss-selector-parser/dist/parser.js:1039:12)
    at new Parser (/home/runner/work/mermaid-live-editor/mermaid-live-editor/node_modules/postcss-selector-parser/dist/parser.js:164:10)
    at Processor._root (/home/runner/work/mermaid-live-editor/mermaid-live-editor/node_modules/postcss-selector-parser/dist/processor.js:53:18)
    at Processor._runSync (/home/runner/work/mermaid-live-editor/mermaid-live-editor/node_modules/postcss-selector-parser/dist/processor.js:100:21)
    at Processor.processSync (/home/runner/work/mermaid-live-editor/mermaid-live-editor/node_modules/postcss-selector-parser/dist/processor.js:197:23)
    at /home/runner/work/mermaid-live-editor/mermaid-live-editor/node_modules/postcss-minify-selectors/dist/index.js:214:45
    at /home/runner/work/mermaid-live-editor/mermaid-live-editor/node_modules/postcss/lib/container.js:96:18
    at /home/runner/work/mermaid-live-editor/mermaid-live-editor/node_modules/postcss/lib/container.js:55:18
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.
@saadeghi
Copy link
Owner

@sidharthv96 Are you sure this is an issue from daisyUI?
I cloned your repo, I uninstalled daisyui, removed it from tailwind.config.js and removed the custom apply lines from app.postcss but still I can't build the app:

[vite] Error when evaluating SSR module /src/lib/components/view.svelte:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /mermaid-live-editor/node_modules/d3/src/index.js
require() of ES modules is not supported.
require() of /mermaid-live-editor/node_modules/d3/src/index.js from /mermaid-live-editor/node_modules/mermaid/dist/mermaid.core.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.

@sidharthv96
Copy link
Author

sidharthv96 commented Oct 17, 2021

That's weird.
The only thing I had to change to get it to build was change daisyUI version.
The dependabot PR was for 1.14.5. That build failed.
Then I tried instal ling locally, with version set as "^1.14.5". Failed.
"^1.14.2" : Failed (I guess because it was fetching 1.14.5 version)
"1.14.2": Success (Exact version)
"1.14.5": Failed
"1.14.4": Failed
"1.14.3": Success

The error you seem to get is an old one which was fixed recently.

The latest master build has passed with DaisyUI(1.14.3): https://github.com/mermaid-js/mermaid-live-editor/runs/3917405439

https://github.com/mermaid-js/mermaid-live-editor/blob/579b3edf33b6b3c2f184c5dfa6461d5641abee9a/package.json#L55

@dsebastien
Copy link

I don't know if it's related, but as of version 1.14.4, I get the following error when building a Svelte application:

https://github.com/sveltejs/svelte/blob/ee769101fc95688c3045f0fd4f47d09b15bc70c3/src/compiler/compile/css/Selector.ts#L159
https://github.com/sveltejs/svelte/blob/b720f0e6202f57cc6e4a16106aa16c620db86dfa/src/compiler/compile/compiler_errors.ts#L227

With version 1.14.3, everything works fine.

@saadeghi
Copy link
Owner

I think what might cause this error is using CSS :where() selector here on one of themes
And apparently Sveltekit doesn't see that as a valid selector 🤔
I'm trying *:where() instead of :where() in version 1.14.7
Can you please try the latest version (1.14.7) and see if the error still exists?

@dsebastien
Copy link

Unfortunately the same error occurs with 1.14.7.

Here is the selector that causes the error:


Selector:  {
  "type": "PseudoClassSelector",
  "name": "global",
  "children": [
    {
      "type": "Raw",
      "value": "*:where(.btn),:global(.mockup-code),:global(.mockup-window),:global(.badge),:global(.card)",
      "start": 25011,
      "end": 25101
    }
  ],
  "start": 25003,
  "end": 25102
}

@sidharthv96
Copy link
Author

If *:where() is a valid CSS selector, isn't this a SvelteKit issue?

@dsebastien
Copy link

Yes I agree with you, I don't understand the problem with the above actually. I'll share the link to this issue on the issue tracker of Svelte... :)

@saadeghi
Copy link
Owner

I opened an issue for svelte-preprocess: sveltejs/svelte-preprocess#425

@saadeghi
Copy link
Owner

@dsebastien @sidharthv96 Can you please confirm that daisyUI 1.15.0 fixes this issue?

@sidharthv96
Copy link
Author

sidharthv96 commented Oct 23, 2021

mermaid-js/mermaid-live-editor#465

Build has passed 🔥❤️
Thank you

@dsebastien
Copy link

Yes, @saadeghi, it works perfectly 🚀

Thank you 🙏

@saadeghi saadeghi removed the blocked label Feb 24, 2022
inorganik pushed a commit to inorganik/daisyui that referenced this issue Feb 7, 2023
imgbot bot pushed a commit to Avensen/daisyui that referenced this issue Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants