javascript - Error: Cannot find module 'flux' -
i have js project requires other js files parent directory.
here structure of project:
- web
- package.json
- ...
- core
- js
- ...
here content of package.json
{   "name": "propertyfinder",   "version": "0.0.1",   "main": "js/app.js",   "dependencies": {     "flux": "^2.0.1",     "keymirror": "~0.1.0",     "object-assign": "^1.0.0",     "react": "^0.12.0"   },   "devdependencies": {     "browserify": "^6.2.0",     "envify": "^3.0.0",     "reactify": "^0.15.2",     "uglify-js": "~2.4.15",     "watchify": "^2.1.1"   },   "scripts": {     "start": "watchify -o js/bundle.js -v -d app.js",     "build": "browserify . -t [envify --node_env production] | uglifyjs -cm > js/bundle.min.js",     "test": "jest"   },   "author": "jean lebrument",   "browserify": {     "transform": [       "reactify",       "envify"     ]   } } when run npm start i've these errors: 
watchify -o js/bundle.js -v -d app.js
error: cannot find module 'flux' 'myproject/core/common' error: cannot find module 'keymirror' '/myproject/core/modules/searchpage/constants'
i checked , in "node_modules" directory, "flux" , "keymirror" directories present.
is because files core directory in parent directory of project?
thanks!
finally, figured out. had create package.json file in core directory 2 dependencies: flux , keymirror. 
Comments
Post a Comment