Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to use coffee script for the first time so I can alter the Chosen plugin by Harvest. I used the npm install -d command as specified at their GitHub page to install cake and coffee.

This is the response I get in Terminal from the install. It seems ok.

    Chriss-MacBook-Pro:chosen chrispaynter$ npm install -d
    npm info it worked if it ends with ok
    npm info using npm@1.1.66
    npm info using node@v0.8.15
    npm info preinstall chosen@0.9.8
    npm info trying registry request attempt 1 at 17:43:15
    npm http GET https://registry.npmjs.org/uglify-js
    npm info trying registry request attempt 1 at 17:43:15
    npm http GET https://registry.npmjs.org/coffee-script
    npm http 304 https://registry.npmjs.org/coffee-script
    npm http 200 https://registry.npmjs.org/uglify-js
    npm info retry fetch attempt 1 at 17:43:20
    npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-2.2.1.tgz
    npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-2.2.1.tgz
    npm info shasum c47e5f0ac40ea8cd951584d7cb08251085a02ea0
    npm info shasum /var/folders/js/8hvbp5wn7112m6q2vrtvc0fw0000gn/T/npm-22190/1354776200898-0.665826462674886/tmp.tgz
    npm info shasum 999ddf992af8f21d597621e5745c1b0a365cab6b
    npm info shasum /Users/chrispaynter/.npm/uglify-js/2.2.1/package.tgz
    npm info install coffee-script@1.4.0 into /Users/chrispaynter/GitHub/chosen
    npm info install uglify-js@2.2.1 into /Users/chrispaynter/GitHub/chosen
    npm info installOne coffee-script@1.4.0
    npm info installOne uglify-js@2.2.1
    npm info /Users/chrispaynter/GitHub/chosen/node_modules/coffee-script unbuild
    npm info /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js unbuild
    npm info preinstall coffee-script@1.4.0
    npm info build /Users/chrispaynter/GitHub/chosen/node_modules/coffee-script
    npm info linkStuff coffee-script@1.4.0
    npm info install coffee-script@1.4.0
    npm info postinstall coffee-script@1.4.0
    npm info preinstall uglify-js@2.2.1
    npm info trying registry request attempt 1 at 17:43:23
    npm http GET https://registry.npmjs.org/source-map
    npm info trying registry request attempt 1 at 17:43:23
    npm http GET https://registry.npmjs.org/optimist
    npm http 200 https://registry.npmjs.org/optimist
    npm info retry fetch attempt 1 at 17:43:27
    npm http GET https://registry.npmjs.org/optimist/-/optimist-0.3.5.tgz
    npm http 200 https://registry.npmjs.org/source-map
    npm info retry fetch attempt 1 at 17:43:27
    npm http GET https://registry.npmjs.org/source-map/-/source-map-0.1.8.tgz
    npm http 200 https://registry.npmjs.org/optimist/-/optimist-0.3.5.tgz
    npm info shasum 03654b52417030312d109f39b159825b60309304
    npm info shasum /var/folders/js/8hvbp5wn7112m6q2vrtvc0fw0000gn/T/npm-22190/1354776207590-0.29829918104223907/tmp.tgz
    npm http 200 https://registry.npmjs.org/source-map/-/source-map-0.1.8.tgz
    npm info shasum 706b69dbcda9485c412444c953536af3c84e5715
    npm info shasum /Users/chrispaynter/.npm/optimist/0.3.5/package.tgz
    npm info shasum 0bcc088a50ed8c586f50c8da4833a27dc0cc0c30
    npm info shasum /var/folders/js/8hvbp5wn7112m6q2vrtvc0fw0000gn/T/npm-22190/1354776207907-0.6172509784810245/tmp.tgz
    npm info shasum 0bcc088a50ed8c586f50c8da4833a27dc0cc0c30
    npm info shasum /Users/chrispaynter/.npm/source-map/0.1.8/package.tgz
    npm info install optimist@0.3.5 into /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js
    npm info install source-map@0.1.8 into /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js
    npm info installOne optimist@0.3.5
npm info installOne source-map@0.1.8
npm info /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js/node_modules/optimist unbuild
npm info /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js/node_modules/source-map unbuild
npm info preinstall optimist@0.3.5
npm info trying registry request attempt 1 at 17:43:30
npm http GET https://registry.npmjs.org/wordwrap
npm info preinstall source-map@0.1.8
npm info trying registry request attempt 1 at 17:43:30
npm http GET https://registry.npmjs.org/amdefine
npm http 200 https://registry.npmjs.org/wordwrap
npm info retry fetch attempt 1 at 17:43:32
npm http GET https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz
npm http 200 https://registry.npmjs.org/amdefine
npm info retry fetch attempt 1 at 17:43:32
npm http GET https://registry.npmjs.org/amdefine/-/amdefine-0.0.4.tgz
npm http 200 https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz
npm http 200 https://registry.npmjs.org/amdefine/-/amdefine-0.0.4.tgz
npm info shasum b79669bb42ecb409f83d583cad52ca17eaa1643f
npm info shasum /var/folders/js/8hvbp5wn7112m6q2vrtvc0fw0000gn/T/npm-22190/1354776212399-0.16841556527651846/tmp.tgz
npm info shasum 510e24a0f231314e1105b9c747e79aaed694a0e9
npm info shasum /var/folders/js/8hvbp5wn7112m6q2vrtvc0fw0000gn/T/npm-22190/1354776212409-0.4660297026857734/tmp.tgz
npm info shasum 128b5f2b33fcb64adc31d9a0ba13df6fc6c397c2
npm info shasum /Users/chrispaynter/.npm/wordwrap/0.0.2/package.tgz
npm info install wordwrap@0.0.2 into /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js/node_modules/optimist
npm info installOne wordwrap@0.0.2
npm info /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap unbuild
npm info shasum f4148643494a8ba95fbc3af06b6af48346b9aedb
npm info shasum /Users/chrispaynter/.npm/amdefine/0.0.4/package.tgz
npm info install amdefine@0.0.4 into /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js/node_modules/source-map
npm info installOne amdefine@0.0.4
npm info /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine unbuild
npm info preinstall amdefine@0.0.4
npm info build /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine
npm info linkStuff amdefine@0.0.4
npm info install amdefine@0.0.4
npm info postinstall amdefine@0.0.4
npm info build /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js/node_modules/source-map
npm info linkStuff source-map@0.1.8
npm info install source-map@0.1.8
npm info postinstall source-map@0.1.8
npm info preinstall wordwrap@0.0.2
npm info build /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap
npm info linkStuff wordwrap@0.0.2
npm info install wordwrap@0.0.2
npm info postinstall wordwrap@0.0.2
npm info build /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js/node_modules/optimist
npm info linkStuff optimist@0.3.5
npm info install optimist@0.3.5
npm info postinstall optimist@0.3.5
npm info build /Users/chrispaynter/GitHub/chosen/node_modules/uglify-js
npm info linkStuff uglify-js@2.2.1
npm info install uglify-js@2.2.1
npm info postinstall uglify-js@2.2.1
npm info build /Users/chrispaynter/GitHub/chosen
npm info linkStuff chosen@0.9.8
npm info install chosen@0.9.8
npm info postinstall chosen@0.9.8
coffee-script@1.4.0 node_modules/coffee-script


uglify-js@2.2.1 node_modules/uglify-js
├── source-map@0.1.8 (amdefine@0.0.4)
└── optimist@0.3.5 (wordwrap@0.0.2)
npm info ok 

However, I can't get coffee to work. When I try and access the variable, i keep getting a command not found error.

Chriss-MacBook-Pro:chosen chrispaynter$ coffee
-bash: coffee: command not found

I did earlier try to install via npm install -g coffee-script but I got the same error once it was installed. Does any one know what is going on here?

share|improve this question

migrated from stackoverflow.com Dec 6 '12 at 9:42

This question came from our site for professional and enthusiast programmers.

2 Answers 2

You need to install coffee-script globally:

npm install coffee-script -g
share|improve this answer

For windows, Search for coffee.cmd and include that path in your path environment variable. It should be something like /Users/chrispaynter/GitHub/chosen/node_modules/.bin

Try this for mac. http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.