node.js - Browserify build fails with local version of an npm module in my package.json dependencies -
i've managed setup package.json
, build app's dependencies bundle using browserify
, however, when try , switch out 1 of dependencies forked local copy build fails.
this works , installs upstream version (omitting other modules):
"dependencies": {"react-bootstrap": "0.13.0"}
a local path fork fails:
"dependencies": {"react-bootstrap": "/home/tom/dev/react-bootstrap/"}
as using npm link
, seems "correct" way of managing local version minimal hassle.
finally, using git url fork fails:
"dependencies": {"react-bootstrap": "git://github.com/tompaton/react-bootstrap.git"}
i tried updating package.json
in react-bootstrap
module repository url pointed tompaton/react-bootstrap
didn't make difference.
the error message i'm getting not shedding light on situation:
(cycles)tom@neon:~/dev/flask_projects/cycles!$ npm run build > cycles@1.0.0 build /home/tom/dev/flask_projects/cycles > browserify -r react-bootstrap -o static/lib-runtime.js error: cannot find module 'react-bootstrap' '/home/tom/dev/flask_projects/cycles' @ /home/tom/dev/flask_projects/cycles/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:50:17 @ process (/home/tom/dev/flask_projects/cycles/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:119:43) @ /home/tom/dev/flask_projects/cycles/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:128:21 @ load (/home/tom/dev/flask_projects/cycles/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:60:43) @ /home/tom/dev/flask_projects/cycles/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:66:22 @ /home/tom/dev/flask_projects/cycles/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:21:47 @ object.oncomplete (fs.js:107:15) npm err! cycles@1.0.0 build: `browserify -r react-bootstrap -o static/lib-runtime.js` npm err! exit status 1 npm err! npm err! failed @ cycles@1.0.0 build script. npm err! problem cycles package, npm err! not npm itself. npm err! tell author fails on system: npm err! browserify -r react-bootstrap -o static/lib-runtime.js npm err! can info via: npm err! npm owner ls cycles npm err! there additional logging output above. npm err! system linux 3.13.0-43-generic npm err! command "/usr/bin/node" "/usr/bin/npm" "run" "build-runtime" npm err! cwd /home/tom/dev/flask_projects/cycles npm err! node -v v0.10.26 npm err! npm -v 1.4.3 npm err! code elifecycle npm err! npm err! additional logging details can found in: npm err! /home/tom/dev/flask_projects/cycles/npm-debug.log npm err! not ok code 0
/home/tom/dev/flask_projects/cycles/npm-debug.log
has same information.
the node_modules
folder looks like:
(cycles)tom@neon:~/dev/flask_projects/cycles!$ ls -al node_modules/react-bootstrap/ total 64 drwxrwxr-x 7 tom tom 4096 dec 16 22:00 . drwxrwxr-x 14 tom tom 4096 dec 16 22:00 .. drwxr-xr-x 6 tom tom 4096 dec 16 22:00 docs -rw-r--r-- 1 tom tom 3886 dec 16 22:00 gruntfile.js drwxr-xr-x 3 tom tom 4096 dec 16 22:00 ie8 -rw-r--r-- 1 tom tom 228 dec 16 22:00 .jshintrc -rw-r--r-- 1 tom tom 425 dec 16 22:00 karma.ci.js -rw-r--r-- 1 tom tom 390 dec 16 22:00 karma.dev.js -rw-r--r-- 1 tom tom 1123 dec 16 22:00 license -rw-r--r-- 1 tom tom 146 dec 16 22:00 .npmignore -rw-r--r-- 1 tom tom 3596 dec 16 22:00 package.json -rw-r--r-- 1 tom tom 1345 dec 16 22:00 readme.md drwxr-xr-x 3 tom tom 4096 dec 16 22:00 src drwxr-xr-x 3 tom tom 4096 dec 16 22:00 test drwxr-xr-x 5 tom tom 4096 dec 16 22:00 tools -rw-r--r-- 1 tom tom 37 dec 16 22:00 .travis.yml
so npm install
has downloaded right version , permissions fine.
can tell me how resolve this? or @ least point me better information on actual error is?
run browserify
or gulp
task node_path=./node_modules
so:
node_path=./node_modules gulp scripts
that tell node-resolve
, extension, browserify
use local folder resolve dependencies.
Comments
Post a Comment