GithubHelp home page GithubHelp logo

Comments (9)

indexzero avatar indexzero commented on July 22, 2024

What version of npm are you using? winston is in the package.json file. Can you try:

npm ls forever

And see what the output is?

from forever.

pambram avatar pambram commented on July 22, 2024

Hi, thanks for the follow up.

Using npm version 1.0.6 and below is the output from "npm ls forever"

root@chat-burako:# npm ls forever
npm WARN ls doesn't take positional args. Try the 'search' command
/root
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
root@chat-burako:
#

from forever.

pambram avatar pambram commented on July 22, 2024

My stack trace when trying to run forever:

node.js:181
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'winston'
at Function._resolveFilename (module.js:320:11)
at Function._load (module.js:266:25)
at require (module.js:364:19)
at Object. (/usr/local/sbin/forever:5:15)
at Module._compile (module.js:420:26)
at Object..js (module.js:426:10)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at Array. (module.js:439:10)
at EventEmitter._tickCallback (node.js:173:26)
root@chat-burako:~#

from forever.

indexzero avatar indexzero commented on July 22, 2024

Ok, can you try this?

npm uninstall forever -g 
npm uninstall forever
npm install forever -g

See if that helps? Winston is clearly installed under your /root directory below forever as shown in your output from npm ls forever, but npm is trying to load forever from /usr/local/sbin/forever as shown by your stack trace.

Have you recently upgraded npm to 1.0?

from forever.

pambram avatar pambram commented on July 22, 2024

If I clone from GIT and go to the ~/forever/bin , and run ./forever, I get the same error and the stack shows it's loading from /root directory

node.js:181
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'winston'
at Function._resolveFilename (module.js:320:11)
at Function._load (module.js:266:25)
at require (module.js:364:19)
at Object. (/root/forever/bin/forever:5:15)
at Module._compile (module.js:420:26)
at Object..js (module.js:426:10)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at Array. (module.js:439:10)
at EventEmitter._tickCallback (node.js:173:26)
root@chat-burako:~/forever/bin#

I tried the uninstall/install sequence you gave me and still get the same error. I'm not sure if I upgraded recently or not. Do you think I could try reinstalling npm?

from forever.

indexzero avatar indexzero commented on July 22, 2024

Getting that error is expected if you clone from git and cd to that directory because npm has not yet installed any of the dependencies. Try this:

  mkdir /root/somefolder
  cd /root/somefolder
  git clone [email protected]:indexzero/forever.git
  cd forever
  npm install .
  ./bin/forever list

Do you still get the error after running that command sequence?

from forever.

indexzero avatar indexzero commented on July 22, 2024

Also, I still need to know: Have you been using npm long? Did you recently upgrade from 0.3.18 to 1.0.6? npm changed significantly for 1.0 and you should be aware of how it works:

http://blog.nodejs.org/2011/05/01/npm-1-0-released/

from forever.

pambram avatar pambram commented on July 22, 2024

@indexzero, the method to reinstall forever and run it from ./bin worked, the error no longer appears. What do you suggest, to copy the forever executable to /usr/local/sbin (and how/where would I need to copy the dependencies) or to PATH the git forever clone on my box, in order to use forever from any path in the command line?

The npm I've been using just for a couple of weeks, when I discovered socket.io and node.js when researching to develop my chat server. I don't think I went as far back as 0.3.18.

Thanks

from forever.

indexzero avatar indexzero commented on July 22, 2024

Have you tried reinstalling node / npm?

from forever.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.