No Image

Invalid css after expected was

СОДЕРЖАНИЕ
12 просмотров
10 марта 2020

Пожалуйста, помогите разобраться:

При запуске gulp в терминале появляется ошибка:

gulpfile.js:

Файл stylesheet.css не создается.

1 ответ 1

Вы указываете @media, но не описываете их. Синтаксис требует операторные скобки. Если вы, по какой-то причине, не хотите описывать стили для этих размеров, добавьте, по крайней мере, пустые скобки к каждому @media:

Comments

Copy link Quote reply

leapit commented May 29, 2019

Versions and Environment

Vuetify: 2.0.0-beta.0
Vue: 2.6.10
Browsers: Chrome 74.0.3729.169
OS: Mac OS 10.14.5

Steps to reproduce

Use vue create generate app,then change vuetify to 2.0.0 beta.0 ,below dependencies

Expected Behavior

Should show a normal index page

Actual Behavior

Show error as below

This comment has been minimized.

Copy link Quote reply

DRoet commented May 29, 2019

use sass instead of node-sass for 2.0

This comment has been minimized.

Copy link Quote reply

leapit commented May 29, 2019

@DRoet yes,it works after switch sass dependence,BTW,is there any official document show must use sass for 2.0?

This comment has been minimized.

Copy link Quote reply

DRoet commented May 29, 2019

not yet, thats why this issue got tagged with documentation I think

This comment has been minimized.

Copy link Quote reply

kylejoeckel commented May 29, 2019

This comment has been minimized.

Copy link Quote reply

leapit commented May 30, 2019

@kylejoeckel yes,hope a full upgrade guide after 2.0 release version

This comment has been minimized.

Copy link Quote reply

leapit commented May 30, 2019

also,it seems no stylus support any more

This comment has been minimized.

Copy link Quote reply

johnle >May 30, 2019

That is correct, there is no more stylus support. This is covered in the upgrade guide and will be detailed for the final release. There have been multiple sections added to the documentation where this is explained however:

Читайте также:  Рост в футах калькулятор

As well, the vue-cli-plugin-vuetify will be updated (is currently working on dev branch) so that new installations will receive the correct dependencies.

Comments

Copy link Quote reply

ycg520520 commented Jun 1, 2017

main.js

webpack.base.conf.js

npm run dev

This comment has been minimized.

Copy link Quote reply

GoranGjorgievski commented Jun 26, 2017

Anyone found a solution for this yet?

This comment has been minimized.

Copy link Quote reply

kuzzaka commented Jun 26, 2017

In my case, I found out that this error happened because of several rules with test ‘.scss’ was applied. Maybe your webpack.base.conf is merged with another config where there is another rule for .scss files.
Hope this helps.

This comment has been minimized.

Copy link Quote reply

kuistime commented Nov 17, 2017 •

The same problem, I add sass-loader in webpack.base.conf.js file by follow this instruction( https://github.com/webpack-contrib/sass-loader ).

BUT build/utils.js also defined sass rules, so I comment that line scss: generateLoaders(‘sass’), out, and problem resolved.

This comment has been minimized.

Copy link Quote reply

anilnamde commented Jan 11, 2018 •

I got the same issue after spending some time I realized that I was using /.js$/ in rules test instead of /.scss$/. Changing it fixed it for me.

This comment has been minimized.

Copy link Quote reply

Maseeharazzack commented Jan 11, 2018 •

<
test: /.scss$/,
exclude: [ /node_modules/, helpers.root(‘src’, ‘style.scss’) ],
use: [ ‘to-string-loader’, ‘css-loader’, ‘sass-loader’ ]
>,
<
test: /.scss$/,
use: ExtractTextPlugin.extract( <
use: ‘css-loader!sass-loader’
>)
>,

I have same issue can anyone help me resolving this? My code works in dev environment but in production env it doesn’t work ..

This comment has been minimized.

Copy link Quote reply

javahaxxor commented Jan 15, 2018

basically the same scenario here

This comment has been minimized.

Copy link Quote reply

Читайте также:  Как почистить автозагрузку на windows 10

derakhshanfar commented Jan 27, 2018

same issue for me any solution?

This comment has been minimized.

Copy link Quote reply

TrabacchinLuigi commented Jan 31, 2018 •

I don’t have any other rules who test for scss (or i can’t find it. but i have just one config file. ), but i still get this error .
I’ve solved like this:
< test: /.scss$/, loader: ‘vue-style-loader!css-loader!sass-loader?indentedSyntax=false’ >
The keys was: ?indentedSyntax=false

This comment has been minimized.

Copy link Quote reply

youhackme commented Mar 10, 2018

In my case, I was trying to compile a scss file with mix.less(). –‘

This comment has been minimized.

Copy link Quote reply

seventheluck commented Apr 15, 2018

As kuzzaka said, this error happened because of several same rules named ‘.scss’ !
Hope this helps you.

This comment has been minimized.

Copy link Quote reply

lindenquan commented Sep 9, 2018

I changed from test: /.s?css/ to test: /.scss/, then the error is gone.

This comment has been minimized.

Copy link Quote reply

faustAbc commented Sep 18, 2018

I had a similar trouble. I did not know that it’s shouldn’t to name selectors starting from the number.

1 of 5 tasks complete

This comment has been minimized.

Copy link Quote reply

lake2 commented Jan 8, 2019 •

I have the same problem. Notice that test: /.scss$/, and test: /.css$/, is an regular expression, and a dot match every character, so test: /.css$/ will match scss, which will lead to error . use a slash before dot.

This comment has been minimized.

Copy link Quote reply

S >Feb 9, 2019

It is just an issue of improper indentation of code, once it is properly indented then your issue will get resolved. As in my case, it got resolved when I have removed unnecessary spaces and line break with proper indentation of code :

Читайте также:  Виндовс 10 следит за пользователем как отключить

This comment has been minimized.

Copy link Quote reply

ZhenZY commented Mar 5, 2019

It may just be a problem caused by the lack of a semicolon in the previous line of code.

This comment has been minimized.

Copy link Quote reply

JserJser commented Mar 12, 2019

It may just be a problem caused by the lack of a semicolon in the previous line of code.

yes you say right thanks

This comment has been minimized.

Copy link Quote reply

leesgithub2019 commented May 5, 2019 •

As kuzzaka commented on 26 Jun 2017,this error happened because of several rules with test ‘.scss’ was applied. Maybe your webpack.base.conf is merged with another config where there is another rule for .scss files.
So,I checked my file ‘webpack.config.js’ and found out this

please pay your attention to
exclude: [/.(js|mjs|jsx|ts|tsx)$/, /.html$/, /.json$/, /.scss$/],

you should delete "/.scss$/"
Now you can compile successfully.

This comment has been minimized.

Copy link Quote reply

austinbillings commented Jul 8, 2019 •

I ran into this issue, in a fresh project (newest webpack, loaders, etc.), where I was referencing import ‘./someFilename.scss’ from an es6 js module, and inspired by @leesgithub2019’s comment above, I was able to resolve the issue by removing my webpack loaders for /.css$/ files, leaving only my /.scss$/ rule, since I figured I’d only reference .scss files (and not any plain css).

Beyond that, I suppose you could also get away with a single rule for /.s?css$/ , even though one’s plain CSS would run through the SASS compiler. Luckily SASS is a superset of CSS so that’s a non-issue, but could someone ELI5 the actual problem here?

Edit: FWIW I am not using vuejs-templates , but this was the best result for the issue I searched ("webpack sass Inval >

Комментировать
12 просмотров
Комментариев нет, будьте первым кто его оставит

Это интересно
No Image Компьютеры
0 комментариев
No Image Компьютеры
0 комментариев
No Image Компьютеры
0 комментариев
No Image Компьютеры
0 комментариев
Adblock detector