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.

You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser after upgrading to 2.2.4

See original GitHub issue

I had followed the install instructions to migrate to Tailwind 2.2.4.

Running python manage.py tailwind start from this produced some errors.

We traced the errors and it seemed there were missing packages.

Here’s the bash history

npm run nodemon
npm install npm-run-all --save-dev
npm install browser-sync --save-dev
npm install 
npm run tailwidcss
npm run tailwindcss
npm run tailwindcss -h
npm run tailwindcss 
npm run tailwindcss --postcss
npm run tailwindcss -- -h
npm run tailwindcss -- --postcss
npm run tailwindcss -- -h
npm run tailwindcss -- --postcss ./postcss.config.js 

Then running python manage.py tailwind start produces this error

CssSyntaxError: /theme/static_src/src/styles.scss:5:30: Unknown word
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser

  3 | @tailwind utilities;
  4 | 
> 5 | @import "./file.scss";  // Comment
    |                   ^

Any ideas on how this can be fixed?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
dimitrismistriotiscommented, Oct 15, 2021

Other developer on @jaoxford 's team. @timonweb thanks again for your time.

2reactions
jaoxfordcommented, Oct 15, 2021

We think it would be beneficial to other people to read our conclusion. Before that @timonweb thanks a lot for your time moreover coming back to us.

We decided to start rewriting our CSS to be more aligned with Tailwind’s approach of extracting components.

Through the use of either Django template partials with Tailwind utility classes or adding our custom styles to the Tailwind layers and then treating those like utility classes. For example (from the Tailwind docs):

@layer components {
  .btn-blue {
    @apply py-2 px-4 bg-blue-500 text-white font-semibold rounded-lg shadow-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75;
  }
}

& then in the HTML

<button class="btn-blue">
  Click me
</button>

Once we will rewrite everything to compile with Tailwind as “it should be” or as it is on version 2.1 of Django-tailwind, we will upgrade to the current, 2.2 and keep moving on from there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

You tried to parse SCSS with the standard CSS parser
I have investigated this issue since I lately migrated a medium-size project from v11 to v12. The issue is that you have your...
Read more >
webpack/webpack - Gitter
scss :14:9: Unknown word You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser at Input.error (~/projects/webpack-sass- ......
Read more >
A new CSS parser, compiler, and minifier written in Rust!
I'm very excited to announce @parcel/css, a new CSS parser, compiler, and minifier written in Rust! Check it out on GitHub, or try...
Read more >
Changelog | Meteor API Docs
Throwing error when trying to send email in a production environment but ... use postcss for CSS parsing and minifying, instead of the...
Read more >
Storybook Addon Sass PostCSS
Storybook addon used to run the PostCSS preprocessor with Sass support against your stories. ... postcss@^8. Then, you'll need to update your addons...
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