Registry / devops / purescript-installer

purescript-installer

JSON →
library0.3.5jsnpmunverified

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.

npm install purescript-installer
INSTALL
IMPORT
SIG · PURESCRIPT-INSTALL
P
purescript-installer
devopsjavascriptv0.3.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

install-purescript
✓ npx install-purescript
✗ require('purescript-installer')
This package provides a CLI binary, not a library. Use npx or package.json scripts.
purescript-installer
✓ npm install --save-dev purescript-installer
✗ npm install --save purescript-installer
Should be a devDependency, as it's only needed for building.

Install the purescript-installer package and run it to download a specific version of the PureScript compiler.

npm install --save-dev purescript-installer npx install-purescript --purs-ver 0.14.5
purs --version
Debug
Known issues
gotchaVersion 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.
fix
Update to v0.3.5: npm install purescript-installer@0.3.5
affects: >=0.3.1 <=0.3.2
gotchaIn 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.
fix
Use version 0.2.0 or upgrade to 0.3.x.
affects: 0.2.1
breakingThe package is primarily designed for Node.js >= 12. Older Node versions may experience failures during installation or runtime.
fix
Upgrade Node.js to version 12 or later.
affects: <12
deprecatedThe purescript-installer CLI is intended to be used indirectly through the purescript npm package. Direct use is discouraged for most users.
fix
Use the `purescript` npm package which wraps this installer.
affects: all
gotchaBinary 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.
fix
Check your package.json `bin` field or use the --name flag to override the binary name.
affects: all
Errors
Common errors & fixes
Command failed: stack install
Stack (Haskell build tool) not installed or not in PATH, needed for source compilation fallback.
fix
Install Stack from https://docs.haskellstack.org/ or rely on prebuilt binaries (default).
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules'
Attempting to install globally without appropriate permissions.
fix
Use npm install --save-dev purescript-installer locally instead of global install, or fix permissions.
Error: Cannot find module 'purescript-installer'
Attempting to require('purescript-installer') as a library, but it's a CLI tool.
fix
Use npx install-purescript or define it in npm scripts; do not require it in code.
Upgrade
Version history
0.3.5latest on npm
Audit
Dependencies
nodeoptionalRequires Node >= 12 (engines field)
Agent activity
4 hits · last 30 days
node
4
Resources
purescript-installer — npm install purescript-installer · libregistry