Adding libraries to v12
# 🤝help
i am having difficulty adding libraries using npm. I want to integrate langchain but getting an error saying im missing npmlog. i tried installing this the right way but nothing was working so i copied the npmlog file to node_modules folder and now i get a new error. I noticed that the libraries module isn't loading properly so maybe that is why. any help would be greatly appreciated
have you tried
npm install npmlog
, if that doesn't work, try
npm update -g
you can also try deleting node modules completely and then reinstalling, that might install npmlog:
sudo rm -rf /usr/local/lib/node_modules/
and then run
it is saying it cant find openai.cjs
but for some reason it can find openai.js and then give an error for using require instead of import
Have you tried looking through these threads: . I think you might have to install npm to the latest version manually and delete node then download the latest version from here and then try downloading Langchain. I have never got this error so I might be wrong.
i have redownloaded the latest version of node onto my system and am still getting gthe error. I think maybe because botpress uses its own version of node as is evident by this:
Yeah Im sorry, i dont know how to fix that, Id say contact Botpress support on their website
thanks anyway Muhammad!
they don't support v12 anymore
only on discord
I found the problem...
langchain need node 18 and uses ES Modules which were introduced in node 14
but botpress runs on node 12