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

Error scanning directory with node 6 on nvm #32

Closed
fstani opened this issue Sep 17, 2018 · 2 comments
Closed

Error scanning directory with node 6 on nvm #32

fstani opened this issue Sep 17, 2018 · 2 comments
Projects

Comments

@fstani
Copy link

fstani commented Sep 17, 2018

Using node 6.6 on nvm, there seems to be an issue with scandir, it seems to be scanning relative to the path of the css-purge module rather then the absolute path of the dir

Running this command:
css-purge -i /absolute-path/to/css -o static/all.css

Directory read error: Something went wrong while reading the directory, check your [html] in config_css.json and please try again.
{ Error: ENOENT: no such file or directory, scandir '/home/fabio/.nvm/versions/node/v6.6.0/lib/node_modules/css-purge/absolute-path/to/css'
    at Error (native)
    at Object.fs.readdirSync (fs.js:951:18)
    at getFilePaths (/home/fabio/.nvm/versions/node/v6.6.0/lib/node_modules/css-purge/lib/css-purge.js:1999:10)
    at CSSPurgeEmitter.continueCSSFilesProcessAfterConfig (/home/fabio/.nvm/versions/node/v6.6.0/lib/node_modules/css-purge/lib/css-purge.js:1861:9)
    at emitOne (events.js:96:13)
    at CSSPurgeEmitter.emit (events.js:188:7)
    at readConfig (/home/fabio/.nvm/versions/node/v6.6.0/lib/node_modules/css-purge/lib/css-purge.js:1714:14)
    at CSSPurgeEmitter.continueCSSFilesProcess (/home/fabio/.nvm/versions/node/v6.6.0/lib/node_modules/css-purge/lib/css-purge.js:1908:5)
    at emitOne (events.js:96:13)
    at CSSPurgeEmitter.emit (events.js:188:7)
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: '/home/fabio/.nvm/versions/node/v6.6.0/lib/node_modules/css-purge/absolute-path/to/css' }

BTW, this works, providing the specific file

css-purge -i /absolute-path/to/css/one.css -o static/all.css

@AndrewEQ
Copy link
Contributor

Thanks for the feedback @fstani, will look into it asap.

@AndrewEQ AndrewEQ added this to Low priority in Core Nov 2, 2018
@AndrewEQ AndrewEQ moved this from Low priority to Closed in Core Nov 2, 2018
@AndrewEQ AndrewEQ moved this from Closed to Low priority in Core Nov 2, 2018
@AndrewEQ AndrewEQ removed this from Low priority in Core Nov 2, 2018
@AndrewEQ AndrewEQ added this to To Do in Core Nov 2, 2018
@AndrewEQ AndrewEQ moved this from To Do to In Progress in Core Nov 2, 2018
AndrewEQ added a commit that referenced this issue Nov 2, 2018
* Fixed absolute directory on folder input - #32
* Added support for base64 image urls - #33
* Added support for preserving selector order - #31
@AndrewEQ
Copy link
Contributor

AndrewEQ commented Nov 2, 2018

Sorted it out, test and lemme know if you still have an issue.

@AndrewEQ AndrewEQ closed this as completed Nov 2, 2018
Core automation moved this from In Progress to Completed Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Core
  
Completed
Development

No branches or pull requests

2 participants