postcss-modules-example icon indicating copy to clipboard operation
postcss-modules-example copied to clipboard

Path have double drive letters

Open xowei opened this issue 8 years ago • 3 comments

I've clone this repo to my drive named E: I ran npm install and gulp

Then i got an error:

E:\postcss-modules-example>gulp
[15:22:32] Using gulpfile E:\postcss-modules-example\Gulpfile.js
[15:22:32] Starting 'css'...
{ [Error: ENOENT: no such file or directory, open 'E:\E:\postcss-modules-example\css\mixins.css']
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'E:\\E:\\postcss-modules-example\\css\\mixins.css' }
{ [Error: ENOENT: no such file or directory, open 'E:\E:\postcss-modules-example\css\colors.css']
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'E:\\E:\\postcss-modules-example\\css\\colors.css' }
[15:22:32] Finished 'css' after 135 ms
[15:22:32] Starting 'html'...
[15:22:32] Finished 'html' after 15 ms
[15:22:32] Starting 'default'...
[15:22:32] Finished 'default' after 17 μs

Path hava double drive letters. Please show me how to fix it.

xowei avatar May 03 '16 07:05 xowei

I have this problem too. And i don't know how to fix it.

kandebr avatar Jun 06 '16 01:06 kandebr

The problem still exists and occurs anytime another stylesheet is referenced in styles.css - using @ value or composes. Upgraded postcss-modules and gulp-postcss to latest versions. Problem remains.

mikehans avatar May 10 '17 23:05 mikehans

I was able to overcome this issue by adding the root option and passing an empty string:

modules({ root: '', getJSON: getJSONFromCssModules }),

This ensures no extra root path prefix is tacked onto the beginning of the resolved path.

frontendauteur avatar Jul 11 '17 04:07 frontendauteur