matype/postcss-style-guide

highlight.js files not found

Closed this issue · 6 comments

Running Windows 8.1
Node 5.1

I get this error.
Module build failed: Error: ENOENT: no such file or directory, open 'C:\dev
000_WebPWS\j6\WebPWS\Private\Project\j6.PwsWebsite\fe-tooling\node_modules\highl
ight.js\styles\github.css'
at Error (native)
at Object.fs.openSync (fs.js:584:18)
at Object.fs.readFileSync (fs.js:431:33)
at generate (C:\dev\000_WebPWS\j6\WebPWS\Private\Project\j6.PwsWebsite\f
e-tooling\node_modules\postcss-style-guide\index.js:79:24)
at C:\dev\000_WebPWS\j6\WebPWS\Private\Project\j6.PwsWebsite\fe-tooling
node_modules\postcss-style-guide\index.js:71:9
at LazyResult.run (C:\dev\000_WebPWS\j6\WebPWS\Private\Project\j6.PwsWeb
site\fe-tooling\node_modules\postcss\lib\lazy-result.js:201:20)
at C:\dev\000_WebPWS\j6\WebPWS\Private\Project\j6.PwsWebsite\fe-tooling
node_modules\postcss\lib\lazy-result.js:115:37
at LazyResult.asyncTick (C:\dev\000_WebPWS\j6\WebPWS\Private\Project\j6.
PwsWebsite\fe-tooling\node_modules\postcss\lib\lazy-result.js:129:15)
at processing.Promise.then._this2.processed (C:\dev\000_WebPWS\j6\WebPWS
\Private\Project\j6.PwsWebsite\fe-tooling\node_modules\postcss\lib\lazy-result.j
s:155:20)
at LazyResult.async (C:\dev\000_WebPWS\j6\WebPWS\Private\Project\j6.PwsW
ebsite\fe-tooling\node_modules\postcss\lib\lazy-result.js:152:27)
at LazyResult.then (C:\dev\000_WebPWS\j6\WebPWS\Private\Project\j6.PwsWe
bsite\fe-tooling\node_modules\postcss\lib\lazy-result.js:75:21)
at Object.module.exports (C:\dev\000_WebPWS\j6\WebPWS\Private\Project\j6
.PwsWebsite\fe-tooling\node_modules\postcss-loader\index.js:43:32)

if I change line 79 from this

    var codeStylePath = path.join('node_modules', 'highlight.js')

to this

    var codeStylePath = path.join(__dirname,'node_modules', 'highlight.js')

it works fine,

It not nesting deep enough. It doesn't look in the node_modules of postcss-style-code, where the dependency lives. It's trying to find the file in my projects node_modules.

I just did a fresh install of this and am getting the same error. Has this fix made it up to npm?

@morishitter I guess you need to ship new version with bunch of some fix commits you've merged.

Sorry, my bad. I just released v0.9.4. Please update to latest version.

Scrum commented

Running Windows 7, Ubuntu
Node 5.2, 0.12.9

Error: ENOENT: no such file or directory, open '/home/scrum/mt/node_modules/postcss-style-guide/node_modules/highlight.js/styles/github.css'

If return to

var codeStylePath = path.join('node_modules', 'highlight.js')

then everything works

Running OSX Yosemite
Node 5.3.0
Npm 3.3.12

I just install the package today and get the same as @gitscrum

Error: ENOENT: no such file or directory, open '/home/scrum/mt/node_modules/postcss-style-guide/node_modules/highlight.js/styles/github.css'

when I change the code back to

    var codeStylePath = path.join('node_modules', 'highlight.js')

It works.