rbtech / css-purge

A CSS tool written in Node JS as a command line app or library for the purging, burning, reducing, shortening, compressing, cleaning, trimming and formatting of duplicate, extra, excess or bloated CSS.
http://rbtech.github.io/css-purge
MIT License
125 stars 19 forks source link

Module Not Found Error After Installing #73

Open dano1066 opened 1 year ago

dano1066 commented 1 year ago

I used "npm install css-purge -g" from the main docs to install and when I run the following command "css-purge -i localcss.txt -o localcssnew.css"

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

Error: Cannot find module 'C:\Users\dan\Desktop\blg\css-purge'
←[90m    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)←[39m
←[90m    at Function.Module._load (internal/modules/cjs/loader.js:746:27)←[39m
←[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)←[39m
←[90m    at internal/main/run_main_module.js:17:47←[39m {
  code: ←[32m'MODULE_NOT_FOUND'←[39m,
  requireStack: []
}

Tried to install the project by checking out the git repo and running npm install. This also throws exceptions.

Error: ENOENT: no such file or directory, stat 'l'
←[90m    at Object.statSync (fs.js:1127:3)←[39m
    at getFilesizeInKiloBytes (C:\Users\dan\Desktop\blg\csspurge\css-purge\lib\css-purge.js:1127:18)
    at readCSSFile (C:\Users\dan\Desktop\blg\csspurge\css-purge\lib\css-purge.js:2134:17)
    at CSSPurgeEmitter.continueCSSFilesProcessAfterConfig (C:\Users\dan\Desktop\blg\csspurge\css-purge\lib\css-purge.js:1909:6)
←[90m    at CSSPurgeEmitter.emit (events.js:375:28)←[39m
    at readConfig (C:\Users\dan\Desktop\blg\csspurge\css-purge\lib\css-purge.js:1737:14)
    at CSSPurgeEmitter.continueCSSFilesProcess (C:\Users\dan\Desktop\blg\csspurge\css-purge\lib\css-purge.js:1931:5)
←[90m    at CSSPurgeEmitter.emit (events.js:375:28)←[39m
    at ReadStream.<anonymous> (C:\Users\dan\Desktop\blg\csspurge\css-purge\lib\css-purge.js:1673:14)
←[90m    at ReadStream.emit (events.js:387:35)←[39m {
  errno: ←[33m-4058←[39m,
  syscall: ←[32m'stat'←[39m,
  code: ←[32m'ENOENT'←[39m,
  path: ←[32m'l'←[39m
}