Closed vladikus10 closed 6 years ago
I just noticed that it shows ./install.sh: line 79: /home/vlad/Node/nlp/node_modules/fasttext-node/node_modules/.bin/grunt: No such file or directory
just before finishing the installation, could this be an issue?
@vladikus10 probably. But that shouldn't happen as yarn or npm should actually install grunt and build the module. Can you confirm if grunt was installed with npm install
or not?
@jazzyarchitects It seems so:
npm list grunt
nlp@1.0.0 /home/vlad/Node/nlp
└─┬ fasttext-node@1.1.7
└── grunt@1.0.2
Then try doing the following at the project root.
$ ./node_modules/.bin/grunt build
Out of curiosity, You have a grunt folder inside node_modules directory? or is it inside node_modules/fasttext-node/node_modules?
I get this:
./node_modules/.bin/grunt build
A valid Gruntfile could not be found. Please see the getting started guide for
more information on how to configure grunt: http://gruntjs.com/getting-started
Fatal error: Unable to find Gruntfile.
I checked the folders and the grunt module is the project/node_modules
folder. The fasttext-node
does not have a node_modules
folder at all.
The this should work:
$ cd node_modules/fasttext-node/ && node ../.bin/grunt build
I ended up with this:
~/Node/nlp$ cd node_modules/fasttext-node/ && node .././bin/grunt build
module.js:549
throw err;
^
Error: Cannot find module '/home/vlad/Node/nlp/node_modules/bin/grunt'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
SO is the grunt module supposed to be in the .bin
folder and not just in the node_modules
?
First of all the path you passed is wrong. You used .././bin
instead of ../.bin
Secondly, I think that yarn or npm directly copies the grunt binaries to .bin directory while installing. Try running yarn or npm again. It should work.
Else I would need more details like
Oh, sorry. I fixed the path and now it works. Thanks for the help!
Welcome
I've just installed all of the required components and tried to install the fasttext-node npm package and it seems that the installation went fine, as got this in the terminal:
However, when I try to use the module by loading it like so:
const fs = require('fasttext-node');
, I receive the following message:Any ideas why this is happening? FYI, I'm using Debian 9.