Skip to content

Installing the purescript npm package fails #21

Closed
@skykanin

Description

@skykanin

Description

Installing purescript through npm i -g purescript fails with output shown underneath. Also tried installing the package in a local project, but got the same error.
Full debug log here

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
/home/skykanin/.npm-global/bin/purs -> /home/skykanin/.npm-global/lib/node_modules/purescript/purs.bin

> [email protected] postinstall /home/skykanin/.npm-global/lib/node_modules/purescript
> install-purescript --purs-ver=0.13.6

✔ Check if a prebuilt 0.13.6 binary is provided for linux (1s)
✔ Download the prebuilt PureScript binary (9s)
✖ Verify the prebuilt binary works correctly
  /home/skykanin/.npm-global/lib/node_modules/purescript/purs.bin --version
  Error: spawn /home/skykanin/.npm-global/lib/node_modules/purescript/purs.bin ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
▬ Save the downloaded binary to the npm cache directory

↓ Fallback: building from source

✖ Check if 'stack' command is available
  stack --allow-different-user --numeric-version
  Error: Command failed with exit code 2 (ENOENT): stack --allow-different-user --numeric-version
spawn stack ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
▬ Download the PureScript 0.13.6 source
▬ Ensure the appropriate GHC is installed
▬ Build a binary from source
▬ Save the built binary to the npm cache directory

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `install-purescript --purs-ver=0.13.6`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/skykanin/.npm/_logs/2020-05-07T17_45_44_600Z-debug.log

To Reproduce

  1. Run npm i -g purescript

Expected behavior

I expect the package to install correctly without failure.

Additional context

OS Info:

  • OS: NixOS 20.09 (Nightingale) x86_64
  • Kernel: 5.6.7
  • CPU: Intel i5-6600 (4) @ 3.900GHz
  • GPU: NVIDIA GeForce GTX 1070
  • Memory: 15963MiB

Npm info:

  • Npm version: 6.14.4
  • Npm config:
  • File: /home/skykanin/.npmrc
    • prefix=~/.npm-global

Allows npm packages to be installed globally on NixOS

PureScript version

0.13.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions