Cannot find module 'winston'

24,015

Solution 1

If the suggestion of setting the class path hasn't worked, it might likely be that you need to use an npm link. See: http://blog.nodejs.org/2011/04/06/npm-1-0-link/

For winston goto the root folder of your script and use the command:

npm link winston

Solution 2

You probably need to export NODE_PATH=/usr/local/lib/node_modules, where /usr/local/lib/node_modules is the path where your node modules are globally installed.

Share:
24,015

Related videos on Youtube

hba
Author by

hba

Updated on January 11, 2022

Comments