aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcyrbon <code.cyrbon@gmail.com>2017-02-25 20:23:59 +0200
committerGitHub <noreply@github.com>2017-02-25 20:23:59 +0200
commitab9442851ea3f003063f7ead8fc566f808391460 (patch)
tree7b616b43ab8ba446d43ebc020929078d4df6e077
parent0d6a36aec55667bafbdfe5b82c88b46ae4e352f2 (diff)
downloadpurs-loader-ab9442851ea3f003063f7ead8fc566f808391460.tar.gz
purs-loader-ab9442851ea3f003063f7ead8fc566f808391460.tar.zst
purs-loader-ab9442851ea3f003063f7ead8fc566f808391460.zip
Add troubleshooting "Error spawn ENOENT"
-rw-r--r--README.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/README.md b/README.md
index 91ccfc0..a4ce614 100644
--- a/README.md
+++ b/README.md
@@ -116,3 +116,20 @@ const webpackConfig = {
116 // ... 116 // ...
117} 117}
118``` 118```
119
120#### Error `spawn ENOENT`
121
122This is caused when the loader tries to spawn a binary that does not exists
123(`file or directory not found`). If you call webpack like `webpack` or
124`webpack --watch`, then you need to ensure that all required binaries that the
125loader depends on are available in your `$PATH`.
126
127If you use `npm run` and `npm start` on NixOS, then it will first attempt to find
128binaries in `node_packages/.bin`. If you have the compiler installed through `npm`
129and it finds it there, this will cause `ENOENT`on Nix, because
130[the binary needs to be patched first, because npm will install the binary that is
131linked with /lib64/ld-linux-x86-64.so.2 - a file that will not exist at that path in
132NixOS](https://github.com/ethul/purescript-webpack-example/issues/5#issuecomment-282492131).
133The solution is to simply use the compiler from `haskellPackages.purescript` and
134make sure that it's available in `$PATH`. For more information about how to make
135it work on Nix, see [Purescript Webpack Example](https://github.com/ethul/purescript-webpack-example#using-globally-installed-binaries)