question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tauri integration fails

See original GitHub issue

Describe the bug

I think, the problem is, because the processing mechanism of postcss.

I followed the installation instructions of tailwindcss from the webpage https://tailwindcss.com/docs/guides/sveltekit

I get

[vite] Internal server error: [postcss] /<abs path to project>/src/routes/+page.svelte?svelte&type=style&lang.css:1:1: Unknown word
  Plugin: vite:css
  File: /<abs path to project>/src/routes/+page.svelte?svelte&type=style&lang.css:1:1
  1  |  <script>
     |   ^
  2  |    import Greet from "$lib/Greet.svelte";
  3  |  </script>

Reproduction

  1. Blank install of tauri with svelte & Typescript
  2. Adding tailwind described on webpage https://tailwindcss.com/docs/guides/sveltekit

Expected behavior

We are having here an absolute path from the filesystem. I suppose, postcss needs an url to attach url parameters on it to parse the css

?svelte&type=style&lang.css:1:1

Platform and versions

I think any

Stack trace

at Input.error (/home/jbc/Work/indi/indi-desktop/node_modules/postcss/lib/input.js:148:16)
      at Parser.unknownWord (/home/jbc/Work/indi/indi-desktop/node_modules/postcss/lib/parser.js:540:22)
      at Parser.other (/home/jbc/Work/indi/indi-desktop/node_modules/postcss/lib/parser.js:164:12)
      at Parser.parse (/home/jbc/Work/indi/indi-desktop/node_modules/postcss/lib/parser.js:72:16)
      at parse (/home/jbc/Work/indi/indi-desktop/node_modules/postcss/lib/parse.js:11:12)
      at new LazyResult (/home/jbc/Work/indi/indi-desktop/node_modules/postcss/lib/lazy-result.js:133:16)
      at Processor.process (/home/jbc/Work/indi/indi-desktop/node_modules/postcss/lib/processor.js:28:14)
      at compileCSS (file:///home/jbc/Work/indi/indi-desktop/node_modules/vite/dist/node/chunks/dep-2285ba4f.js:37647:14)
      at async TransformContext.transform (file:///home/jbc/Work/indi/indi-desktop/node_modules/vite/dist/node/chunks/dep-2285ba4f.js:37121:56)
      at async Object.transform (file:///home/jbc/Work/indi/indi-desktop/node_modules/vite/dist/node/chunks/dep-2285ba4f.js:42569:30)

Additional context

No response

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
thinkrapidocommented, Dec 16, 2022
rm -rf src-tauri/target
rm -rf .svelte-kit
yarn tauri dev
fixes it

!!!SOLVED!!!

0reactions
thinkrapidocommented, Dec 16, 2022

Sorry, this is not a nix specific problem. I can replicate it with ubuntu 22.04.

I further inverstigated it and I created a clean installation of tauri. This can show up its app. After I integrated tailwindcss and applied yarn tauri dev this error appeared again. Then I created a build and tauri creates a in the cargo release folder an executable. Starting this works with tailwindcss.

This is strange and it lets me think about how vite runs in development mode. Something strange happens here.

Where can I find more information about vite and its dev mode processing?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command `tauri dev` fail,fresh app.exe · Issue #2573 - GitHub
Describe the bug Follow the document Setup for windows and Tauri Integration. All steps have been successful. But when I run the command ......
Read more >
Tauri integration problem - Questions - three.js forum
Hi I'm trying to integrate three js / react fiber app with tauri, everything works perfectly when I compile js app to .exe...
Read more >
Cross-Platform Compilation - Tauri Apps
Tauri relies heavily on native libraries and toolchains, so meaningful cross-compilation is not possible at the current moment. The next best option is...
Read more >
How to Build a Cross-Platform Application with Next.js and Tauri
To solve the bundle identifier error, first open the my-demo/src-tauri/tauri.conf.json file and find identifier . Then change the "identifier": ...
Read more >
Newest 'tauri' Questions - Stack Overflow
Attempting to create a new tauri app causes permissions error ... I'm building a Tauri app and would like to set up OAuth...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found