[MacPorts] #37013: Not require node.js modules, installed globaly via npm
#37013: Not require node.js modules, installed globaly via npm -------------------------------------------------+------------------------- Reporter: darkvlados@… | Owner: macports- Type: defect | tickets@… Priority: Normal | Status: new Component: ports | Milestone: Keywords: npm node nodejs node.js require | Version: 2.1.2 module | Port: -------------------------------------------------+------------------------- If I use require('some_module_installed_global') in my node.js projects, then: Error: Cannot find module 'some_module_installed_global' Which modules install in /opt/local/lib/node_modules/, but $NODE_PATH not properly sets. -- Ticket URL: <https://trac.macports.org/ticket/37013> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37013: Not require node.js modules, installed globaly via npm ---------------------------+-------------------------------- Reporter: darkvlados@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: npm | ---------------------------+-------------------------------- Changes (by macsforever2000@…): * keywords: npm node nodejs node.js require module => * port: => npm Comment: In the future, please fill in the Port field and Cc the port maintainer(s). -- Ticket URL: <https://trac.macports.org/ticket/37013#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37013: Not require node.js modules, installed globaly via npm ---------------------------+------------------------- Reporter: darkvlados@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: npm | ---------------------------+------------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => ciserlohn@… -- Ticket URL: <https://trac.macports.org/ticket/37013#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37013: Not require node.js modules, installed globaly via npm ---------------------------+------------------------- Reporter: darkvlados@… | Owner: ciserlohn@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: invalid | Keywords: Port: npm | ---------------------------+------------------------- Changes (by ryandesign@…): * status: new => closed * cc: ryandesign@… (added) * resolution: => invalid Old description:
If I use require('some_module_installed_global') in my node.js projects, then: Error: Cannot find module 'some_module_installed_global'
Which modules install in /opt/local/lib/node_modules/, but $NODE_PATH not properly sets.
New description: If I use require('some_module_installed_global') in my node.js projects, then: {{{ Error: Cannot find module 'some_module_installed_global' }}} Which modules install in /opt/local/lib/node_modules/, but $NODE_PATH not properly sets. -- Comment: This sounds like not a MacPorts problem but a question of how nodejs and npm work. If you want to require() something in your project, then you're supposed to `npm install` the module locally, not globally, or else use `npm link`. Ask in a nodejs support venue if you have further questions. -- Ticket URL: <https://trac.macports.org/ticket/37013#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts