node.js - npm installs packages and dependencies in the project root directory -


i switched windows mac. when i'm trying install npm modules, packages , dependencies created inside project root directory.

on windows module installing ./node_modules, dependencies inside module folder.

is there need configure make work before?

edit

i have both, node_modules folder , package.json in project dir:

{   "name": "react",   "version": "0.0.1",   "private": true,   "dependencies": {     "chokidar": "^1.0.3"   } } 

and still, chokidar package , dependencies in project root.

when use npm install, until finds package.json or node_modules folder , install package there.

so if project structure this

project_root/   modules/     mymodule/   node_modules 

and run npm install in mymod directory, module installed in project_root/node_modules


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -