twitter/hogan.js — Issue #44: problems running `hulk`
Author: pthrasher
Created: 2012-02-11 00:40:24+00:00
State: open

I'm having an odd problem running `hulk` I install the module, get an odd error from env, and nothing else. I've tried a few other node modules, and this is the only one giving me issues... Below is the output from my term session.

[pthrasher@hiro] ------------------------------------------------------ 19:31:01
~) npm install -g hogan
/opt/Developer/.nvm/v0.6.1/bin/hulk -> /opt/Developer/.nvm/v0.6.1/lib/node_modules/hogan/bin/hulk
hogan@1.0.5-dev /opt/Developer/.nvm/v0.6.1/lib/node_modules/hogan
[pthrasher@hiro] ------------------------------------------------------ 19:31:11
~) hulk
env: node\r: No such file or directory
[pthrasher@hiro] ------------------------------------------------------ 19:31:23
~) node /opt/Developer/.nvm/v0.6.1/lib/node_modules/hogan/bin/hulk
USAGE: hulk ./templates/*.mustaches
NOTE: hulk supports the "*" wildcard and allows you to target specific extensions too
[pthrasher@hiro] ------------------------------------------------------ 19:32:00
~) npm install hogan
hogan@1.0.5-dev ./node_modules/hogan
[pthrasher@hiro] ------------------------------------------------------ 19:32:12
~) hulk
env: node\r: No such file or directory
[pthrasher@hiro] ------------------------------------------------------ 19:32:18
~) node ./node_modules/hogan/bin/hulk
USAGE: hulk ./templates/*.mustaches
NOTE: hulk supports the "*" wildcard and allows you to target specific extensions too
[pthrasher@hiro] ------------------------------------------------------ 19:38:59
~) head -35 /opt/Developer/.nvm/v0.6.1/lib/node_modules/hogan/bin/hulk
#!/usr/bin/env node

/*
* Copyright 2011 Twitter, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

var hogan = require('../lib/hogan.js'),
path = require('path'),
fs = require('fs');

var specials = ['/', '.', '*', '+', '?', '|','(', ')', '[', ']', '{', '}', '\\'],
specialsRegExp = new RegExp('(\\' + specials.join('|\\') + ')', 'g'),
templates;

// Escape special regexp characters
function esc(text) {
return text.replace(specialsRegExp, '\\$1');
}

// Check for dirs and correct ext (<3 for windows)
function extractFiles(args) {
var usage = 'USAGE: hulk ./templates/*.mustaches\n' +