node js npm package OSX fails

Howard Pautz

After reading many ( if not all :-| ) posts having similar problems, I still don't have a working local (or a "global") install of node.js's Mac OSX system tools. Showing global attempt here...

Their doc implies either an npm install or a build from source - but not npm THEN source. However, a test run seems to be requiring compiled file(s) that don't exist after the attempted install.

Details:

It's my understanding that npm should be sufficient, but when I do the recommended

sudo npm install -g osx 

npm creates /usr/local/lib/node_modules and populates with

README.md  osx.cc   osx.js  package.json    wscript

Running (from anywhere) node theirSample.js, containing:

Var osx = require('osx');
// also tried full path as recommended in other answers
var osx = require('/usr/local/lib/node_modules/osx');

The error is the commonly seen "cannot find module". However, the specific error is:

Cannot find module './build/Release/osx'

Which stems from the above osx.js created in /usr/local/lib/node_modules That file has the errant line:

var osx = require('./build/Release/osx');

That implies that I need the ./build/Release/osx dir, but npm did not create this under the modules dir. So does that mean I need to compile the source? If so, any pointers on set up please.

Andrei Karpushonak

First of all, you don't need to install it globally, and second, this module is already 2 years old, and it was tested on Darwin 11.2. It does not work with OS X "Mavericks" - just tested on my machine.

As a replacement, I would recommend to take a look at os build-in module, which provides basic operating-system related utility functions, and is OS-agnostic

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Node.js' npm is installing the wrong package

From Dev

node twitter npm package

From Dev

Node.js: Get (absolute) root path of installed npm package

From Dev

Error - Installing mariasql package using npm - node.js

From Dev

Error - Installing mariasql package using npm - node.js

From Dev

Concerning Node.js was Bootstrap npm package recently deprecated?

From Dev

Installing Node Sailsjs package with NPM

From Dev

Node: Error in installing npm package

From Dev

Installing Node Sailsjs package with NPM

From Dev

npm install fails because package is missing in registry

From Dev

npm install fails because package is missing in registry

From Dev

Node.js - should I use the npm install of history.js or the single files in this package?

From Dev

How to require an alternative js file from a npm package without specifiying full node_modules path

From Java

How do you prevent install of "devDependencies" NPM modules for Node.js (package.json)?

From Dev

Node.js - Can I install NPM package on a PhoneGap / Cordova application?

From Dev

Using stock node js package installer for OS X, global NPM bower path not recognized

From Dev

Node.js unit test spawn command to view npm package details

From Dev

Brew install node --without-npm fails

From Dev

npm install fails on `eb create` Node 6.2.2

From Dev

Why does `DEBUG=foo node index.js` fails in `scripts` section of `package.json`

From Dev

Jenkins 1.609 native package installer fails on OSX Yosemite

From Dev

Nodejs, Npm, node. Package difference?

From Dev

NPM not working with update on node js

From Dev

Node js fails to install cordova

From Dev

npm install phantom.js fails

From Dev

npm mulfunction after node 5.0.0 install with OSX El Capitan

From Dev

HBase fails to start in single node cluster mode on Mac OSX

From Dev

HBase fails to start in single node cluster mode on Mac OSX

From Dev

Npm package installation fails - how to restore the old working version?

Related Related

  1. 1

    Node.js' npm is installing the wrong package

  2. 2

    node twitter npm package

  3. 3

    Node.js: Get (absolute) root path of installed npm package

  4. 4

    Error - Installing mariasql package using npm - node.js

  5. 5

    Error - Installing mariasql package using npm - node.js

  6. 6

    Concerning Node.js was Bootstrap npm package recently deprecated?

  7. 7

    Installing Node Sailsjs package with NPM

  8. 8

    Node: Error in installing npm package

  9. 9

    Installing Node Sailsjs package with NPM

  10. 10

    npm install fails because package is missing in registry

  11. 11

    npm install fails because package is missing in registry

  12. 12

    Node.js - should I use the npm install of history.js or the single files in this package?

  13. 13

    How to require an alternative js file from a npm package without specifiying full node_modules path

  14. 14

    How do you prevent install of "devDependencies" NPM modules for Node.js (package.json)?

  15. 15

    Node.js - Can I install NPM package on a PhoneGap / Cordova application?

  16. 16

    Using stock node js package installer for OS X, global NPM bower path not recognized

  17. 17

    Node.js unit test spawn command to view npm package details

  18. 18

    Brew install node --without-npm fails

  19. 19

    npm install fails on `eb create` Node 6.2.2

  20. 20

    Why does `DEBUG=foo node index.js` fails in `scripts` section of `package.json`

  21. 21

    Jenkins 1.609 native package installer fails on OSX Yosemite

  22. 22

    Nodejs, Npm, node. Package difference?

  23. 23

    NPM not working with update on node js

  24. 24

    Node js fails to install cordova

  25. 25

    npm install phantom.js fails

  26. 26

    npm mulfunction after node 5.0.0 install with OSX El Capitan

  27. 27

    HBase fails to start in single node cluster mode on Mac OSX

  28. 28

    HBase fails to start in single node cluster mode on Mac OSX

  29. 29

    Npm package installation fails - how to restore the old working version?

HotTag

Archive