cspell: cspell fails to install using nodeenv

While trying to enable cspell to be used a pre-commit hook, I faces a new issue, failure to install when doing:

pip install --user nodeenv
git clone https://github.com/Jason3S/cspell
cd cspell
nodeenv nenv
. nenv/bin/activate
npm install -g .

The last command fails with:

$ npm install -g .                                                                                                                                                                                          [21:18:12]
npm ERR! path /home/ssbarnea/cspell/nenv/lib/node_modules/cspell/dist/app.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/ssbarnea/cspell/nenv/lib/node_modules/cspell/dist/app.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ssbarnea/.npm/_logs/2018-07-04T21_18_18_526Z-debug.log
(nenv)FAIL: 254

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 24 (9 by maintainers)

Commits related to this issue

Most upvoted comments

The package was using prepublish but that was deprecated. It now uses prepare.

This patch seems to make npm install -g . work:

diff --git a/package.json b/package.json
index e3f34fa..a9516a8 100644
--- a/package.json
+++ b/package.json
@@ -19,6 +19,7 @@
     "lint": "tslint --force --format verbose \"src/**/*.ts\"",
     "lint-travis": "tslint \"src/**/*.ts\"",
     "build": "npm run compile",
+    "prepare": "npm run compile",
     "clean-build": "npm run clean && npm run build && npm run build-dictionaries",
     "build-dictionaries": "npm run build_dictionaries-word-lists",
     "build_dictionaries-word-lists": "node node_modules/cspell-tools/dist/app.js compile \"./dictionaries/!(words)*.txt\" -o ./dist/dictionaries/",