Node-waf: not found

后端 未结 4 1395
Happy的楠姐
Happy的楠姐 2021-01-17 07:25

Here is the thing. My configuration is Ubuntu 13.04, Node.js v0.10.5 and NPM version 1.2.18.

I am trying to install node.js module \"shoe\" and I got this error:

相关标签:
4条回答
  • 2021-01-17 08:11

    I simply upgraded my node version (from 0.4.4 into 0.6.2), problem was resolved.

    0 讨论(0)
  • 2021-01-17 08:12

    It's actually rbytes that's causing the issue.

    To make it even more complex: rbytes isn't a direct dependency for shoe, but for sockjs. And looking at the code, that should function without rbytes too.

    Since shoe declares is as an optional dependency, shoe does get installed:

    npm WARN optional dep failed, continuing rbytes@0.0.2
             ^^^^^^^^             ^^^^^^^^^^        
    

    So you should just be able to use it regardless of the warning.

    0 讨论(0)
  • 2021-01-17 08:13

    node-waf has been replaced by node-gyp

    Install node-gyp using: sudo npm install -g node-gyp

    Note: To build with node-gyp the configuration file binding.gyp is required. Example:

    {
      "targets": [
        {
          "target_name": "binding",
          "sources": [ "src/binding.cc" ]
        }
      ]
    }
    
    0 讨论(0)
  • 2021-01-17 08:14

    I haven't had luck getting node-waf on my machine, so I decided to fork the thing and migrate it to node-gyp so that it works.

    My fork is at https://github.com/eddydas/node-sleep

    To get it work, first make sure you have node-gyp by

    $ npm install node-gyp
    

    Then, clone the entire project from GitHub (either by ZIP or Git, it's up to you) and install from it.

    $ cd ~
    $ wget "https://codeload.github.com/eddydas/node-sleep/zip/master"
    $ unzip master
    $ cd YOUR_NODE_JS_PROJECT_FOLDER
    $ npm install ~/node-sleep-master
    

    I tried my best to make the thing work. If it doesn't go smooth, please feel free to let me know. Hope it helps!

    0 讨论(0)
提交回复
热议问题