I hit this as well, and have a worksforme solution.
I think it's a conflict between a globally-installed module in the path and
the npm installed in the local dir. Or something.
I worked around it by:
cd bootstrap
npm uninstall -g uglify-js jshint recess connect
npm uninstall uglify-js jshint recess connect
npm install
mkdir bin
cd bin
ln -s ../node_modules/*/bin/* . ; ln -s hint jshint
cd ..
( export PATH=$PATH:$PWD/bin ; make )
Weirdities:
* make clean doesn't hit the right directory
* when things are happy, jslint emits a harmless(?) error "path.existsSync
is now called `fs.existsSync`."; when things are bad it doesn't
* typing 'npm install' == good, 'npm install uglify-js jshint recess
connect' == bad
flip
----------------- output when happy --------------
worblehat /tmp$ cd bootstrap
worblehat /tmp/bootstrap$ npm uninstall -g uglify-js jshint recess
connect
npm WARN uninstall not installed in /usr/local/share/npm/lib/node_modules:
"uglify-js"
npm WARN uninstall not installed in /usr/local/share/npm/lib/node_modules:
"jshint"
npm WARN uninstall not installed in /usr/local/share/npm/lib/node_modules:
"recess"
npm WARN uninstall not installed in /usr/local/share/npm/lib/node_modules:
"connect"
worblehat /tmp/bootstrap$ npm uninstall uglify-js jshint recess
connect
worblehat /tmp/bootstrap$ npm install
npm http GET https://registry.npmjs.org/uglify-js/1.2.6
npm http GET https://registry.npmjs.org/recess/1.0.3
npm http GET https://registry.npmjs.org/jshint/0.6.1
npm http GET https://registry.npmjs.org/connect/2.1.3
npm http 304 https://registry.npmjs.org/uglify-js/1.2.6
npm http 304 https://registry.npmjs.org/connect/2.1.3
npm WARN package.json [email protected] No README.md file found!
npm http 304 https://registry.npmjs.org/jshint/0.6.1
npm http 304 https://registry.npmjs.org/recess/1.0.3
npm WARN engine [email protected]: wanted: {"node":">= 0.5.0 < 0.7.0"}
(current: {"node":"v0.8.8","npm":"1.1.59"})
npm http GET https://registry.npmjs.org/argsparser
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/less
npm http GET https://registry.npmjs.org/qs/0.4.2
npm http GET https://registry.npmjs.org/mime/1.2.4
npm http GET https://registry.npmjs.org/formidable/1.0.9
npm http GET https://registry.npmjs.org/crc/0.1.0
npm http GET https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/argsparser
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/less
npm http 304 https://registry.npmjs.org/qs/0.4.2
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/formidable/1.0.9
npm http 304 https://registry.npmjs.org/mime/1.2.4
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/crc/0.1.0
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/lru-cache
npm WARN prefer global [email protected] should be installed with -g
npm http 304 https://registry.npmjs.org/abbrev
npm WARN prefer global [email protected] should be installed with -g
[email protected] node_modules/uglify-js
[email protected] node_modules/connect
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
[email protected] node_modules/jshint
├── [email protected]
└── [email protected] ([email protected])
[email protected] node_modules/recess
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
└── [email protected]
worblehat /tmp/bootstrap$ mkdir bin
worblehat /tmp/bootstrap$ cd bin
worblehat /tmp/bootstrap/bin$ ln -s ../node_modules/*/bin/* . ; ln -s
hint jshint
worblehat /tmp/bootstrap/bin$ cd ..
worblehat /tmp/bootstrap$ ( export PATH=$PATH:$PWD/bin ; make )
##################################################
Building Bootstrap...
##################################################
Running JSHint on javascript... ✔ Done
path.existsSync is now called `fs.existsSync`.
path.existsSync is now called `fs.existsSync`.
Compiling LESS with Recess... ✔ Done
Compiling documentation... ✔ Done
Compiling and minifying javascript... ✔ Done
##################################################
Bootstrap successfully built at 02:21AM.
##################################################
Thanks for using Bootstrap,
<3 @mdo and @fat
On Saturday, November 24, 2012 2:16:41 PM UTC-6, David Korz wrote:
>
> I've cloned the github repo, installed the required npm modules and did a
> make. It fails with an error in uglify parising
> docs/assets/js/bootstrap.js. This is the first time I've tried this so I
> don't know if I'm doing something wrong. It failed on Mac Lion and Ubuntu
> 12.04.
>
> builder@builder:~/projects/bootstrap$ make
>
> ##################################################
> Building Bootstrap...
> ##################################################
>
> Running JSHint on javascript... ✔ Done
> Compiling LESS with Recess... ✔ Done
> Compiling documentation... ✔ Done
> Binary
> Error parsing arguments in: docs/assets/js/bootstrap.js
> make: *** [build] Error 1
>
>