You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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' }
I'm not clear on how this could possibly be related to nvm; presumably which css-purge places it inside npm root -g, which is itself inside nvm's directory for that node version.
Have you tried on other node versions with nvm? Have you tried on node 6.6 without nvm?
You can see here that it's using fs.realPath, which resolves symlinks - is either $NVM_DIR or $HOME a symlink?
As informed in the rbtech/css-purge#32 project
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
Operating system and version:
ubuntu 16.04
nvm debug
output:nvm ls
output:nvm
? (e.g. install script in readme, Homebrew):git clone
Ran a node lib that scans a dir
Got an EACCESS error, instead of using the absolute path it used the path relative to the nvm module path
scandir scans the absolute path providede
.bashrc
,.bash_profile
,.zshrc
, etc) that modifies thePATH
?The text was updated successfully, but these errors were encountered: