Closed
Description
Version
4.0.0-rc.0
Reproduction link
https://github.com/jacekkarczmarczyk/vue-cli-sass-loader-repro
Environment info
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz
Binaries:
Node: 12.6.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.17.3 - C:\Users\Jacek\AppData\Roaming\npm\yarn.CMD
npm: 6.10.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 42.17134.1.0
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.0.0
@vue/babel-plugin-transform-vue-jsx: 1.0.0
@vue/babel-preset-app: 3.11.0
@vue/babel-preset-jsx: 1.1.0
@vue/babel-sugar-functional-vue: 1.0.0
@vue/babel-sugar-inject-h: 1.0.0
@vue/babel-sugar-v-model: 1.0.0
@vue/babel-sugar-v-on: 1.1.0
@vue/cli-overlay: 3.11.0
@vue/cli-plugin-babel: ^3.2.0 => 3.11.0
@vue/cli-plugin-eslint: ^3.2.0 => 3.11.0
@vue/cli-plugin-typescript: ^3.2.0 => 3.11.0
@vue/cli-service: ^3.2.0 => 3.11.0
@vue/cli-shared-utils: 3.11.0
@vue/component-compiler-utils: 3.0.0
@vue/eslint-config-standard: ^4.0.0 => 4.0.0
@vue/eslint-config-typescript: ^4.0.0 => 4.0.0
@vue/preload-webpack-plugin: 1.1.1
@vue/test-utils: ^1.0.0-beta.20 => 1.0.0-beta.29
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^5.0.0 => 5.2.3 (4.7.1)
eslint-plugin-vuetify: ^1.0.0-beta.1 => 1.0.0-beta.3
typescript: ~3.5.0 => 3.5.3
vue: ^2.5.21 => 2.6.10
vue-eslint-parser: 5.0.0 (2.0.3)
vue-hot-reload-api: 2.3.3
vue-loader: 15.7.1
vue-style-loader: 4.1.2
vue-template-compiler: ^2.5.21 => 2.6.10
vue-template-es2015-compiler: 1.9.1
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
Clone the repo and run yarn && yarn build
What is expected?
Successfull build
What is actually happening?
$ vue-cli-service build
- Building for production...
Starting type checking service...
Using 1 worker with 2048MB memory limit
ERROR Failed to compile with 1 errors22:27:09
error in ./src/App.vue?vue&type=style&index=0&lang=sass&
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema.
- options has an unknown property 'indentedSyntax'. These properties are valid:
object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }
at validate (C:\cygwin64\home\Jacek\karpc\repro\node_modules\sass-loader\node_modules\schema-utils\dist\validate.js:49:11)
at Object.loader (C:\cygwin64\home\Jacek\karpc\repro\node_modules\sass-loader\dist\index.js:36:28)
at C:\cygwin64\home\Jacek\karpc\repro\node_modules\webpack\lib\NormalModule.js:313:20
at C:\cygwin64\home\Jacek\karpc\repro\node_modules\loader-runner\lib\LoaderRunner.js:367:11
at C:\cygwin64\home\Jacek\karpc\repro\node_modules\loader-runner\lib\LoaderRunner.js:233:18
at runSyncOrAsync (C:\cygwin64\home\Jacek\karpc\repro\node_modules\loader-runner\lib\LoaderRunner.js:143:3)
at iterateNormalLoaders (C:\cygwin64\home\Jacek\karpc\repro\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
at iterateNormalLoaders (C:\cygwin64\home\Jacek\karpc\repro\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
at C:\cygwin64\home\Jacek\karpc\repro\node_modules\loader-runner\lib\LoaderRunner.js:236:3
at context.callback (C:\cygwin64\home\Jacek\karpc\repro\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at C:\cygwin64\home\Jacek\karpc\repro\node_modules\cache-loader\dist\index.js:118:7
at C:\cygwin64\home\Jacek\karpc\repro\node_modules\graceful-fs\graceful-fs.js:57:14
at FSReqCallback.oncomplete (fs.js:153:23)
@ ./src/App.vue?vue&type=style&index=0&lang=sass& 1:0-480 1:496-499 1:501-978 1:501-978
@ ./src/App.vue
@ ./src/main.ts
@ multi ./src/main.ts
Error goes off when you remove <style>
section from App.vue
It also worked when I removed
defaultSassLoaderOptions.fiber = require('fibers')
in https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/config/css.js#L21 and changed
indentedSyntax: true
to
sassOptions: {
indentedSyntax: true
}
in https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/config/css.js#L181