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

highlight.js files not found #24

Closed
Mash19 opened this issue Nov 18, 2015 · 6 comments
Closed

highlight.js files not found #24

Mash19 opened this issue Nov 18, 2015 · 6 comments

Comments

@Mash19
Copy link

Mash19 commented Nov 18, 2015

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,

@Mash19
Copy link
Author

Mash19 commented Nov 18, 2015

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.

@lukelarsen
Copy link

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

@watilde
Copy link
Contributor

watilde commented Dec 15, 2015

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

@matype
Copy link
Owner

matype commented Dec 16, 2015

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

@matype matype closed this as completed Dec 16, 2015
@Scrum
Copy link

Scrum commented Dec 17, 2015

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

@ronnross
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants