Skip to content
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

Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, #997

Closed
CalebKester opened this issue Mar 16, 2018 · 9 comments
Labels

Comments

@CalebKester
Copy link
Contributor

CalebKester commented Mar 16, 2018

Version

3.0.0-beta.6

Steps to reproduce

? Please pick a preset: Manually select features
? Check the features needed for your project: PWA, Router, Vuex, CSS Pre-processors, Linter, Unit, E2E
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): SCSS/SASS
? Pick a linter / formatter config: Prettier
? Pick additional lint features: Lint on save, Lint and fix on commit
? Pick a unit testing solution: Jest
? Pick a E2E testing solution: Cypress
? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? Yes
? Save preset as: yobi
? Pick the package manager to use when installing dependencies: Yarn

run 'yarn build'

What is expected?

Project to build

What is actually happening?

yarn run v1.5.1
$ vue-cli-service build

\  Building for production...

 ERROR  Failed to compile with 2 errors                                                                                                               15:06:51

 error  in ./src/App.vue

Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-we
bpack-plugin for the usage example
    at Object.pitch (C:\work\ap-app-2\node_modules\extract-text-webpack-plugin\dist\loader.js:57:11)

 @ ./src/App.vue 2:2-398
 @ ./src/main.js
 @ multi ./src/main.js

 error  in ./src/components/HelloWorld.vue

Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-we
bpack-plugin for the usage example
    at Object.pitch (C:\work\ap-app-2\node_modules\extract-text-webpack-plugin\dist\loader.js:57:11)

 @ ./src/components/HelloWorld.vue 2:2-440
 @ ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"C://work//ap-app-2//node_modules//.cache//cache-loader"}!./node_modules/babel-loader/lib!./node_
modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/Home.vue
 @ ./src/views/Home.vue
 @ ./src/router.js
 @ ./src/main.js
 @ multi ./src/main.js
@LinusBorg
Copy link
Member

you probably have NODE_ENV set to 'development' in your terminal, which breaks the production build process, presumably. Can you check that out?

@CalebKester
Copy link
Contributor Author

@LinusBorg I use windows git's bash terminal in vscode and that seems to be it. I used command prompt and it built like normal. I'll keep looking. It's a fresh install on windows and git bash.

@CalebKester
Copy link
Contributor Author

Marking this as complete. Using command prompt instead of git bash fixed this.

@CalebKester
Copy link
Contributor Author

Isolated this down to a vscode issue with their integrated terminal. Not related to this project but still looking into it.

@mrleerman
Copy link

@CalebKester did you ever get any further with this? i'm experiencing the same problem, but rather than the integrated vscode terminal i'm using PowerShell 5.1. swapping to Command Prompt, of course, magically fixes the issue.

@LinusBorg near as i can tell NODE_ENV is not set in either PowerShell or Command Prompt, yet i get a successful build in Command Prompt. is PowerShell not a supported platform for vue-cli 3?

@CalebKester
Copy link
Contributor Author

Nope I didn't. I gave up and just built it a different way. What computer are you on? I'm windows 10 surface book 2.

I'll reopen this and we can work to figure it out!

@CalebKester CalebKester reopened this Apr 10, 2018
@mrleerman
Copy link

mrleerman commented Apr 10, 2018

I'm on an HP desktop running Windows 10 Enterprise with vue-cli 3.0.0-beta 6 installed globally via npm.

In a normal, non-admin PowerShell window I can reproduce the failure by:
cd c:\projects
mkdir foo
cd foo
vue create bar
selected Manually select features
checked TypeScript
hit Y at class-style components
hit Y at use Babel
chose In dedicated config files
hit N at Save this as a preset
waited for all the packages to install
cd bar
npm run build

If I do nothing but swap from a PowerShell window to a Command Prompt window npm run build succeeds. I've tried running the PowerShell prompt with both the "Run as Administrator" option and normally neither of which provided any change in behaviour.

I've just double checked in the System Properties UI and verified that NODE_ENV is not defined in either the user or system environment variables.

I'm at a loss. This feels like vue-cli-service or one of its dependencies not supporting PowerShell properly.

@KevinFreistroffer
Copy link

Thanks! Command Prompt as Admin worked.

@yyx990803
Copy link
Member

Closing as there is a workaround and we will be moving away from extract-text-webpack-plugin when we upgrade to webpack 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants