Skip to content
Permalink
Browse files

Docs: Add information about WSL

Close #3162
  • Loading branch information...
mahomedalid authored and antross committed Oct 21, 2019
1 parent af5d929 commit 39b09ddbe2bd1dd5010bd0eaa6a0a570a907b8ff
Showing with 30 additions and 0 deletions.
  1. +30 −0 packages/hint/docs/user-guide/troubleshoot/summary.md
@@ -11,6 +11,35 @@ This section contains the most commons issues reported by users with
potential fixes. If you run into something that is not documented
here please [open an issue in the hint repo][new issue].

## Windows Subsystem Linux

Due to the project using binary packages (`canvas` and `iltorb`)
you can find some problems related to building those packages on WSL:

> Info looking for cached prebuild @
/home/mahome/.npm/_prebuilds/47fbee-iltorb-v2.4.3-node-v59-linux-x64.tar.gz
> WARN install No prebuilt binaries found (target=9.10.0 runtime=node
arch=x64 libc= platform=linux)
> gyp ERR! build error
> gyp ERR! stack Error: not found: make
This is solved by installing the prerequisites of those packages [iltorb].
**However, due to the hard dependency on Puppeteer,
we do not recommend using WSL to run webhint.**
If you want to run webhint on WSL, you need to create your own config
file with this minimum content:
```json
{ "extends": ["web-recommended"], "connector": "jsdom" }
```
And then we need to pass the configuration to hint:
```bash
npx hint -c ./path/to/.hintrc https://example.com
```
## Building Windows packages
Depending on your environment you could get an error similar to the
@@ -68,6 +97,7 @@ globally.
[canvas compile]: https://github.com/Automattic/node-canvas#compiling
[canvas x86]: https://github.com/node-gfx/node-canvas-prebuilt/issues/27#issuecomment-348037675
[homebrew]: https://brew.sh/
[iltorb]: https://www.npmjs.com/package/iltorb
[new issue]: https://github.com/webhintio/hint/issues/new
[npm change default directory]: https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-npms-default-directory-to-another-directory
[npm use package manager]: https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-3-use-a-package-manager-that-takes-care-of-this-for-you

0 comments on commit 39b09dd

Please sign in to comment.
You can’t perform that action at this time.