Closed sergeymorkovkin closed 5 years ago
It appears (from the node_modules path) you're using an older version of npm. Suggest trying a clean install of wordpos
again, or update your node/npm.
npm cache clean --force
sudo npm install -g wordpos
- failedsudo npm i -g npm
(5.6.0 → 6.4.1)sudo npm install -g wordpos
- failedHowever, it installs okay without -g switch. Do you have any clues why?
Something similar is happening to me. Seems like the following file is not being created.
Error: ENOENT: no such file or directory, open '/[...]/node_modules/wordpos/node_modules/wo
rdnet-db/dict/fast-index.noun.json'
Workaround: Go to node_modules/wordpos
and run npm run postinstall
.
It worked for me.
@sergeymorkovkin I don't know why it's failing with -g
for you. I just tried that on Ubuntu with no errors. Are you able to install anything with sudo
& -g
? You might also try @bichotll 's suggestion. wordpos
runs a postinstall to generate fast-index files and puts them in wordnet-db/dict
folder -- maybe the node
process doesn't have the right permission to do that?
@bichotll Did you get any errors when you first installed wordpos
?
Here's a screenshot:
Closing as no activity.
Workaround: Go to
node_modules/wordpos
and runnpm run postinstall
.It worked for me.
Worked for me as well.
Didn't dig into details, here is the log:
`DB folder: /usr/local/lib/node_modules/wordpos/nodemodules/wordnet-db/dict index.adv buckets 1172, max 125 at in, sum 4475, avg 3.82, median 2 fs.js:646 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^
Error: EACCES: permission denied, open '/usr/local/lib/node_modules/wordpos/node_modules/wordnet-db/dict/fast-index.adv.json' at Object.fs.openSync (fs.js:646:18) at Object.fs.writeFileSync (fs.js:1299:33) at BufferedReader. (/usr/local/lib/node_modules/wordpos/tools/stat.js:151:10)
at emitNone (events.js:106:13)
at BufferedReader.emit (events.js:208:7)
at ReadStream. (/usr/local/lib/node_modules/wordpos/tools/buffered-reader.js:150:8)
at emitNone (events.js:111:20)
at ReadStream.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
`