aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoreric <thul.eric@gmail.com>2017-02-25 13:36:30 -0500
committerGitHub <noreply@github.com>2017-02-25 13:36:30 -0500
commit33bcd87e2213e8a9b1eea4be48b5c0e0e8d3ea0b (patch)
treebb14238b29fa6856a03f30464409589a8a7ab196
parent0d6a36aec55667bafbdfe5b82c88b46ae4e352f2 (diff)
parentbe05a0550905c1c6b993af72bd511b6dbe73101d (diff)
downloadpurs-loader-33bcd87e2213e8a9b1eea4be48b5c0e0e8d3ea0b.tar.gz
purs-loader-33bcd87e2213e8a9b1eea4be48b5c0e0e8d3ea0b.tar.zst
purs-loader-33bcd87e2213e8a9b1eea4be48b5c0e0e8d3ea0b.zip
Merge pull request #87 from cyrbon/master
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..c15f03c 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 ensure that all required binaries that the
125loader depends on are available in your `$PATH`.
126
127If you run webpack through an npm script (e.g., npm run or npm start) on NixOS,
128then it will first attempt to find binaries in `node_packages/.bin`.
129If you have the compiler installed through `npm` and it finds it there, this will
130cause `ENOENT`on Nix, because [the binary needs to be patched first, but npm will
131install the binary that is linked with /lib64/ld-linux-x86-64.so.2 - a file that
132will not exist at that path in NixOS](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)