Skip to content

installation failure (Cannot find module 'psl') #19

Open

Description

@bbarker

Full log at https://gist.github.com/bbarker/dc27562e3919883b09982d31fe11dbad

$ npm install purescript --save-dev
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

> purescript@0.13.6 postinstall /wd/node_modules/purescript
> install-purescript --purs-ver=0.13.6

internal/modules/cjs/loader.js:797
    throw err;
    ^

Error: Cannot find module 'psl'
Require stack:
- /wd/node_modules/tough-cookie/lib/pubsuffix-psl.js
- /wd/node_modules/tough-cookie/lib/cookie.js
- /wd/node_modules/request/lib/cookies.js
- /wd/node_modules/request/index.js
- /wd/node_modules/purescript-installer/dl-tar/index.js
- /wd/node_modules/purescript-installer/download-purescript-source/index.js
- /wd/node_modules/purescript-installer/build-purescript/index.js
- /wd/node_modules/purescript-installer/download-or-build-purescript/index.js
- /wd/node_modules/purescript-installer/install-purescript/index.js
- /wd/node_modules/purescript-installer/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/wd/node_modules/tough-cookie/lib/pubsuffix-psl.js:32:11)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/wd/node_modules/tough-cookie/lib/cookie.js:35:17)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/wd/node_modules/tough-cookie/lib/pubsuffix-psl.js',
    '/wd/node_modules/tough-cookie/lib/cookie.js',
    '/wd/node_modules/request/lib/cookies.js',
    '/wd/node_modules/request/index.js',
    '/wd/node_modules/purescript-installer/dl-tar/index.js',
    '/wd/node_modules/purescript-installer/download-purescript-source/index.js',
    '/wd/node_modules/purescript-installer/build-purescript/index.js',
    '/wd/node_modules/purescript-installer/download-or-build-purescript/index.js',
    '/wd/node_modules/purescript-installer/install-purescript/index.js',
    '/wd/node_modules/purescript-installer/index.js'
  ]
}
npm WARN purescript-metajelo@ No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! purescript@0.13.6 postinstall: `install-purescript --purs-ver=0.13.6`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the purescript@0.13.6 post
[2020-03-02T16_53_17_120Z-debug.log](https://github.com/purescript/npm-installer/files/4276715/2020-03-02T16_53_17_120Z-debug.log)
[2020-03-02T16_53_17_120Z-debug.log](https://github.com/purescript/npm-installer/files/4276719/2020-03-02T16_53_17_120Z-debug.log)

install 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/brandon/.npm/_logs/2020-03-02T16_53_17_120Z-debug.log

$ node --version
v12.13.0

Full container specification at https://github.com/bbarker/purescript-hodgepodge

Activity

  1. hdgarrood commented on Apr 14, 2020

    @hdgarrood
    Collaborator

    Thanks for the report. It looks like tough-cookie, a dependency of request, is expecting psl to be installed, but for some reason it isn't. I think, since request is deprecated, the best approach is to just drop the request dependency in favour of something else, like perhaps node-fetch.

  2. hdgarrood commented on May 21, 2020

    @hdgarrood
    Collaborator

    I just tried to reproduce this on your Docker container and I wasn't able to. Were you running this in a directory with a package.json file? I think that might be affecting this.

  3. changed the title [-]npm install --save-dev purescript fails (noticed on 13.6, but only recently an issue)[/-] [+]installation failure (Cannot find module 'psl')[/+] on May 21, 2020
  4. bbarker commented on May 21, 2020

    @bbarker
    Author

    Yes, there was very likely a package.json involved, though at this point I'm not sure I can recall which one (if it matters).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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