Opened 12 years ago
Closed 12 years ago
#37013 closed defect (invalid)
Not require node.js modules, installed globaly via npm
Reported by: | darkvlados@… | Owned by: | ci42 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: | npm |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
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.
Change History (5)
comment:1 Changed 12 years ago by mf2k (Frank Schima)
Keywords: | npm node nodejs node.js require module removed |
---|---|
Port: | npm added |
comment:4 Changed 12 years ago by mf2k (Frank Schima)
Owner: | changed from macports-tickets@… to ciserlohn@… |
---|
comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Description: | modified (diff) |
Resolution: | → invalid |
Status: | new → closed |
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.
Note: See
TracTickets for help on using
tickets.
In the future, please fill in the Port field and Cc the port maintainer(s).