moos / wordpos

Part-of-speech utilities for node.js based on the WordNet database.
478 stars 41 forks source link

postinstall script fails with npm 5 #19

Closed julien-c closed 7 years ago

julien-c commented 7 years ago
> wordpos@1.1.2 postinstall /Users/user/devel/project/node_modules/wordpos
> node tools/stat.js --no-stats index.adv index.adj index.verb index.noun

fs.js:896
  return binding.readdir(pathModule._makeLong(path), options.encoding);
                 ^

Error: ENOENT: no such file or directory, scandir '/Users/user/devel/project/node_modules/wordpos/node_modules/wordnet-db/dict'
    at Object.fs.readdirSync (fs.js:896:18)
    at Object.<anonymous> (/Users/user/devel/project/node_modules/wordpos/node_modules/wordnet-db/index.js:4:31)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
julien-c commented 7 years ago

PS: I can confirm that the issue is with npm 5, not node 8.

If I fix it, any way this can be merged quickly? (forked npm modules are a pain to setup in a project...)

mehmetilker commented 7 years ago

@julien-c have you found a solution for the problem ?

julien-c commented 7 years ago

Nope, no reply from @moos so far

bensalilijames commented 7 years ago

Installing with yarn instead of npm works fine for a quick workaround!

bensalilijames commented 7 years ago

I made an issue here: npm/npm#17073

julien-c commented 7 years ago

Yay thanks for the investigation @benhjames great job!

moos commented 7 years ago

Sorry for belated reply -- and thanks for investigating and filing the issue on npm 5. Not sure how I can unblock anyone running into this issue. Let's hope npm folks will issue a patch soon.

julien-c commented 7 years ago

Maybe in the meantime ship a untarred version of wordnet-db, or temporarily link to my fork as a dependency? https://github.com/julien-c/wordnet-db

(Seems like lots of people here rely on your package for production systems :)

moos commented 7 years ago

After a failed attempt at polling for the wordnet-db dict/ folder, I've gone with @julien-c's recommendation of checking in the exploded dict/ files in wordnet-db until there is a fix for npm.

Please try re-installing.

julien-c commented 7 years ago

Yes, worked well.

moos commented 7 years ago

Thanks.