{"id":26131,"library":"purescript-installer","title":"PureScript Installer","description":"A command-line tool that installs the PureScript compiler to the current working directory. It first checks a disk cache, then downloads a prebuilt binary from the PureScript release page, and as a last resort compiles from source using Stack. Version 0.3.5 is the current stable release, with sparse updates since 2019. It is designed to be used behind the scenes by the `purescript` npm package, not directly by most users. Key differentiator: handles multiple installation strategies (cache, binary download, source compilation) automatically.","status":"maintenance","version":"0.3.5","language":"javascript","source_language":"en","source_url":"https://github.com/purescript/npm-installer","tags":["javascript","purescript","compiler","installer"],"install":[{"cmd":"npm install purescript-installer","lang":"bash","label":"npm"},{"cmd":"yarn add purescript-installer","lang":"bash","label":"yarn"},{"cmd":"pnpm add purescript-installer","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Requires Node >= 12 (engines field)","package":"node","optional":true}],"imports":[{"note":"This package provides a CLI binary, not a library. Use npx or package.json scripts.","wrong":"require('purescript-installer')","symbol":"install-purescript","correct":"npx install-purescript"},{"note":"Should be a devDependency, as it's only needed for building.","wrong":"npm install --save purescript-installer","symbol":"purescript-installer","correct":"npm install --save-dev purescript-installer"}],"quickstart":{"code":"npm install --save-dev purescript-installer\nnpx install-purescript --purs-ver 0.14.5","lang":"javascript","description":"Install the purescript-installer package and run it to download a specific version of the PureScript compiler."},"warnings":[{"fix":"Update to v0.3.5: npm install purescript-installer@0.3.5","message":"Version 0.3.1 and 0.3.2 were published without updating the version in package.json, causing potential version mismatch. Use v0.3.5 or later.","severity":"gotcha","affected_versions":">=0.3.1 <=0.3.2"},{"fix":"Use version 0.2.0 or upgrade to 0.3.x.","message":"In version 0.2.1, the purs binary was accidentally included in the published tarball. This may cause confusion if users rely on the binary being present.","severity":"gotcha","affected_versions":"0.2.1"},{"fix":"Upgrade Node.js to version 12 or later.","message":"The package is primarily designed for Node.js >= 12. Older Node versions may experience failures during installation or runtime.","severity":"breaking","affected_versions":"<12"},{"fix":"Use the `purescript` npm package which wraps this installer.","message":"The purescript-installer CLI is intended to be used indirectly through the purescript npm package. Direct use is discouraged for most users.","severity":"deprecated","affected_versions":"all"},{"fix":"Check your package.json `bin` field or use the --name flag to override the binary name.","message":"Binary name on Windows defaults to 'purs.exe', on others 'purs'. However, if package.json specifies a `bin` field for 'purs', that path is used. This can cause confusion if the bin field is set incorrectly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install Stack from https://docs.haskellstack.org/ or rely on prebuilt binaries (default).","cause":"Stack (Haskell build tool) not installed or not in PATH, needed for source compilation fallback.","error":"Command failed: stack install"},{"fix":"Use npm install --save-dev purescript-installer locally instead of global install, or fix permissions.","cause":"Attempting to install globally without appropriate permissions.","error":"Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules'"},{"fix":"Use npx install-purescript or define it in npm scripts; do not require it in code.","cause":"Attempting to require('purescript-installer') as a library, but it's a CLI tool.","error":"Error: Cannot find module 'purescript-installer'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}