-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[Bug Report] Cannot startup with Vuetify2.0 (Sass file error) #7950
Comments
Might be related, but we also tried a dry upgrade today and were met with more than a few seemingly sass related invalid css errors. Here is a snippet:
I looked into things a little closer and caught that |
@mcfarljw I'm having the same issue but I'm not using |
I'm use nuxt.js and when i remove node-sass and install sass, other dependencies still need node-sass.
When i install
And yes, i have in devDependencies P.S. Here
This command dose not install packages to devDependencies.
|
I was able to fix the issue @mcfarljw and GoliafRS referenced by adding this to my Webpack config:
unfortunately now I'm getting a different error:
And I'm having a lot more trouble finding any reference to this issue |
@goliafrs it appears that @DRBragg interesting to know, I totally forgot about the webpack config using the |
@goliafrs don't install @DRBragg you're adding another rule to the existing ones, so the files are run through sass-loader twice |
Oh I see, you need |
@KaelWD Ah, I see. I was hoping to avoid that since it breaks our existing scss files. Thanks for the heads up. I'll figure out what we're going to do with this new information. |
You might need a rule with |
We solved this problem with an new way by official code! At Vuetify 1.15.x, we do this: import Vuetify, then Vue.use(Vuetify,options). Just it!!! But in 2.0.x, you need this: A: import Vuetify, then Vue.use(Vuetify,{components,directives}); C: Put vuetify object into Vue root object, like:
|
Solved! |
What about the nuxt.js? |
@goliafrs I managed to fix the whole issue by using https://www.npmjs.com/package/@nuxtjs/vuetify |
My English level does not give me the opportunity to convey how much I am disappointed in the @alvinthen, thank you very much. For users who also use
|
@KaelWD I just wanted to circle back to this real quick and let you know that I was able to solve my issue by omitting the indentSyntax flag completely. When set to true it breaks all my scss files but when set to false none of your sass files load correctly. I was digging through the docs for
The way they worded 'Default setting' got me thinking and when I omitted the option all together both files load correctly and I'm able to use the vuetify-loader. my final sass-loader rule looks like this:
I don't know if any of this matters to you but maybe it will help someone else with this problem. Thanks for all your hard work on Vuetify. It is really wonderful. |
Hello, I am not completely sure how everything works but i did the following and got the same error trying to update from Vuetify 1.5.16 -> 2.0.4
=> Compiles again and the page loads without errors. Move over to fixes the deprecated components. |
+1 I'm getting the error "Expected '{'" or "expected newline" too many times,
I'm using vue 2.6.10, vuetify 2.0.3, @vue/cli 2
I've also defined the other vue.config.js sections according to single file component here Any suggestions? |
You've written that you're using vue cli 2? Please upgrade to 3. |
Same issue, error with each sass style file. Vue CLI 3, in vue.config.js added this under configureWebpack:
|
Please create a minimal reproduction in a github repo so that we can troubleshoot it further. |
vue-cli already has sass-loader configured, by adding that it gets run twice on each file. |
Sorry, I didn't quite get the solution to the problem. |
Opened a bug report: https://github.com/vuetifyjs/vuetify/issues/8320 |
Apparently @johnleider thinks the FAQ will solve this problem, but it won't. |
@KaelWD that's great to point out for those using vue-cli, but I'm not, and not everyone does. But by all means, please continue being snarky and unhelpful. |
@dcb99 so what does your project setup look like? can you show a github repo, or post your webpack config and main entrypoint file to pastebin? What are the error messages you get? It is very hard to give any sort of advice without knowing what is wrong or what you are working with. |
@nekosaur I can't show a repo, there's too much sensitive data.
|
So a couple of things. First, if you are using vuetify-loader (and importing from Second, I know you have specified the Third, for the hell of it, try adding |
@nekosaur Thanks for the reply. If I don't import the minified CSS, I have zero styling. I definitely don't have
|
Using webpack directly or with laravel-mix, seems to cause parsing problems too. Using previous version, the stylus loading and variable overloading worked without any problems by simple adding the stylus loader package. There parser seems confused about how to manage the code. It's parsing everything as sass. I limited the scope of the loader to just node_modules to test as otherwise there would be issues with extracting CSS code from .vue files too. mix.sass('node_modules/vuetify/src/styles/main.sass', 'public/css/main.css'); produces parsing errors like: |
@dcb99 Your main.js shouldn't have @rvulpescu As above, that message means it's being run through sass-loader twice. I don't know enough about laravel mix to help with that. |
@KaelWD I've removed |
With a-la-carte ( |
I'm using webpack. If you looked at my webpack config file, you'd see there's no reference to node-sass anywhere. |
|
@nekosaur thanks, that seems to have done the trick, or at least moved things in the right direction, but now I'm getting errors about components not being defined. |
To update Vuetify 1.X.X to Vuetify 2.X.X in Nuxtjs, remove the following dependencies from your project:
then install vuetify again ** Note that Vuetify 1.5.x is handled by @nuxtjs/vuetify@0.x.x In your nuxt.config.js, remove vuetify plugin line:
and then create a new section called buildModules.
I found this solution reading this two resources: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I resolve it,share my way
{
test: /\.s(c|a)ss$/,
use: [
'vue-style-loader',
'css-loader',
{
loader: 'sass-loader',
// Requires sass-loader@^7.0.0
// options: {
// implementation: require('sass'),
// fiber: require('fibers'),
// indentedSyntax: true // optional
// },
// Requires sass-loader@^8.0.0
options: {
implementation: require('sass'),
sassOptions: {
fiber: require('fibers'),
//comment the next line
// indentedSyntax: false // optional
},
},
},
],
},
|
This comment has been minimized.
This comment has been minimized.
5th June 2021. I had the same issue.
|
We kindly ask users to not comment on closed/resolved issues. If you believe that this issue has not been correctly resolved, please create a new issue showing the regression or create a new discussion. If you have any questions, please reach out to us in our Discord community. |
Environment
Vuetify Version: 2.0.0
Vue Version: 2.6.10
Browsers: Chrome 75.0.3770.142
OS: Windows 10
Steps to reproduce
We upgrade to Vuetify2.0 today, but cannot startup, because we got an error with each sass style file.
The error is:
basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at Module._compile (internal/modules/cjs/loader.js:718:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:681:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.sassLoader (E:\Workspaces\Web\qian_rich_boat_web\node_modules\sass-loader\lib\loader.js:46:72)
Note:
We use stylus in project。
Expected Behavior
The sass file build success.
Actual Behavior
Build with error.
Reproduction Link
https://codepen.io/
The text was updated successfully, but these errors were encountered: