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.

Stylus: Unexpected character '@' (1:0)

See original GitHub issue
  • Laravel Mix Version: 1.4.5
  • Node Version: 6.9.2
  • NPM Version: 3.10.9
  • OS: macOS 10.13.0

Description:

When installing vuetify I need to compile the stylus assets. When the assets are compiling I get the following errors:

error  in ./node_modules/vuetify/src/stylus/components/_selection-controls.styl

Module parse failed: /Users/dan/Code/Sites/practiceo/practiceo/node_modules/vuetify/src/stylus/components/_selection-controls.styl Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import '../bootstrap'
| @import '../theme'
|

The initial import works correctly but the succeeding imports cause errors.

Steps To Reproduce:

Install vuetify: yarn add vuetify

Create the stylus entry point (resources/assets/stylus/app.styl) with the following content:

@import '../../../node_modules/vuetify/src/stylus/app'

Update webpack.mix.jsfile: mix.stylus(‘resources/assets/stylus/app.styl’, ‘public/css/app.css’);

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

14reactions
johnboccommented, Nov 3, 2017

Thanks pachoulie, you’ve saved my day. For me, I needed the following code:

    mix.webpackConfig({
        module: {
            rules: [
                {
                    test: /\.styl$/,
                    loader: ['style-loader', 'css-loader', 'stylus-loader']
                }
            ]
        }
    })
1reaction
SumNeuroncommented, Feb 7, 2019

I was hoping there was a rollup version…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stylus: Unexpected character '@' (1:0) · Issue #1245 - GitHub
Has anyone got to the bottom of this problem yet? I have just upgraded to Laravel 5.5 and am now getting this error....
Read more >
Module parse failed: Unexpected character '@' (1:0) vuejs ...
we need to configure loader in webpack (webpack.config.js or webpack.js or webpack.base.js) like. webpack.base.js
Read more >
Unexpected character on the second web design projects
When I put your code into code pen I see no unexpected character or no red error - though I'm not sure what...
Read more >
BSOD and unexpected restarts while using pen input on Asus ...
When using the pen input on my Asus VivoTab Note 8 I have been experiencing both BSOD and unexpected shutdowns in Windows 10....
Read more >
Using with Preprocessors - Tailwind CSS
A guide to using Tailwind with common CSS preprocessors like Sass, Less, and Stylus. Since Tailwind is a PostCSS plugin, there's nothing stopping...
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