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.

Cannot add purgecss with vue-cli

See original GitHub issue

Before you open an issue, please check if a similar issue already exists or has been closed before.

When reporting a bug, please try to include the following:

  • A descriptive title
  • An isolated way to reproduce the behavior (example: GitHub repository with code isolated to the issue that anyone can clone to observe the problem)
  • What package and version you’re using, and the platform(s) you’re running it on
  • The behavior you expect to see, and the actual behavior

When you open an issue for a feature request, please add as much detail as possible:

  • A descriptive title
  • A description of the problem you’re trying to solve, including why you think this is a problem
  • An overview of the suggested solution
  • If the feature changes current behavior, reasons why your solution is better

Cannot add purgecss with vue-cli. I get the following error on vue add purgecss:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.com/vue-cli-plugin-purgecss - Not found
npm ERR! 404
npm ERR! 404  'vue-cli-plugin-purgecss@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\papil\AppData\Roaming\npm-cache\_logs\2020-03-30T15_10_50_910Z-debug.log
 ERROR  command failed: npm install --loglevel error vue-cli-plugin-purgecss -D --registry=https://registry.npm.taobao.org

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
papiliondcommented, Mar 31, 2020

@Ffloriel After adding it with vue-cli 4.1.2 and running vue-cli-service serve --mode development, i get the following error (also on build):

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '@fullhuman/vue-cli-plugin-purgecss'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at idToPlugin (C:\Users\papil\source\repos\sport-vue\node_modules\@vue\cli-service\lib\Service.js:149:14)
    at Object.keys.concat.filter.map.id (C:\Users\papil\source\repos\sport-vue\node_modules\@vue\cli-service\lib\Service.js:188:20)
    at Array.map (<anonymous>)
    at Service.resolvePlugins (C:\Users\papil\source\repos\sport-vue\node_modules\@vue\cli-service\lib\Service.js:174:10)
    at new Service (C:\Users\papil\source\repos\sport-vue\node_modules\@vue\cli-service\lib\Service.js:33:25)
    at Object.<anonymous> (C:\Users\papil\source\repos\sport-vue\node_modules\@vue\cli-service\bin\vue-cli-service.js:15:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sport-vue@0.1.0 serve: `vue-cli-service serve --mode development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sport-vue@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\papil\AppData\Roaming\npm-cache\_logs\2020-03-31T09_13_15_449Z-debug.log

I don’t understand the reason, becouse I have the @fullhuman/vue-cli-plugin-purgecss package in my node-modules directory.

Thank you!

3reactions
Fflorielcommented, Mar 30, 2020

The documentation is incorrect. It’s vue add @fullhuman/purgecss I’ll update the docs

Read more comments on GitHub >

github_iconTop Results From Across the Web

@fullhuman/vue-cli-plugin-purgecss - npm
vue -cli plugin to add PurgeCSS. Latest version: 5.0.0, last published: 3 months ago. Start using @fullhuman/vue-cli-plugin-purgecss in your ...
Read more >
Vue - PurgeCSS
PurgeCSS is a tool to remove unused CSS from your project.
Read more >
How to configure PurgeCSS for vue-cli-3 projects with ...
I used TailwindCSS and created a vue.config.js file and it's working, but responsive classes are not being included. I searched about a regex, ......
Read more >
fullhuman/vue-cli-plugin-purgecss v5.0.0 - npm.io
To install the PurgeCSS plugin simply navigate to your application folder and add PurgeCSS. cd my-app vue add purgecss. Usage. Below are the...
Read more >
Purgecss with Tailwind - Laravel Mix & Vue CLI 3 - YouTube
We take a look at using Purgecss to optimize our Tailwind CSS output file size. We'll use it in both Laravel with Laravel...
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