Skip to content

Instantly share code, notes, and snippets.

@mscottford
Created July 14, 2013 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mscottford/5993305 to your computer and use it in GitHub Desktop.
Save mscottford/5993305 to your computer and use it in GitHub Desktop.
$ node --version
v0.10.13
$ npm --version
1.3.2
$ lineman --version
0.11.4
$ lineman new test-app
_ _
| | (_)
| | _ _ __ ___ _ __ ___ __ _ _ __
| | | | '_ \ / _ \ '_ ` _ \ / _` | '_ \
| |____| | | | | __/ | | | | | (_| | | | |
|______|_|_| |_|\___|_| |_| |_|\__,_|_| |_|
- Assembling your new project directory in '/Users/mscottford/src/corgibytes/test-app'
- Created a new project in "test-app/" with Lineman. Yay!
Getting started:
1. `cd test-app` into your new project directory'
2. Start working on your project!
* `lineman run` starts a web server at http://localhost:8000
* `lineman build` bundles a distribution in the "dist" directory
* `lineman clean` empties the "dist" and "generated" directories
* `lineman spec` runs specs from the "specs" directory using testem
For more info, check out http://github.com/testdouble/lineman
$ cd test-app/
$ lineman grunt --tasks
path.js:360
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at Object.file.exists (/usr/local/share/npm/lib/node_modules/lineman/node_modules/grunt/lib/grunt/file.js:371:28)
at task.loadTasks (/usr/local/share/npm/lib/node_modules/lineman/node_modules/grunt/lib/grunt/task.js:358:18)
at Array.forEach (native)
at Task.task.init (/usr/local/share/npm/lib/node_modules/lineman/node_modules/grunt/lib/grunt/task.js:444:33)
at Object.grunt.tasks (/usr/local/share/npm/lib/node_modules/lineman/node_modules/grunt/lib/grunt.js:113:8)
at Object.module.exports [as cli] (/usr/local/share/npm/lib/node_modules/lineman/node_modules/grunt/lib/grunt/cli.js:38:9)
at Command.<anonymous> (/usr/local/share/npm/lib/node_modules/lineman/lib/cli/main.coffee:49:20)
at Command.<anonymous> (/usr/local/share/npm/lib/node_modules/lineman/node_modules/commander/index.js:254:8)
at Command.EventEmitter.emit (events.js:98:17)
at Command.parseArgs (/usr/local/share/npm/lib/node_modules/lineman/node_modules/commander/index.js:471:12)
at Command.parse (/usr/local/share/npm/lib/node_modules/lineman/node_modules/commander/index.js:378:15)
at module.exports (/usr/local/share/npm/lib/node_modules/lineman/lib/cli/main.coffee:56:22)
at Object.<anonymous> (/usr/local/share/npm/lib/node_modules/lineman/cli.js:3:26)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
@searls
Copy link

searls commented Jul 14, 2013

@davemo the issue you're experiencing could very well be a separate issue (no local grunt in package.json)

The lineman CLI skirts this by loaning the user it's grunt dep.

@searls
Copy link

searls commented Jul 14, 2013

So far @mscottford, my debugging suggests that the grunt CLI api (which is only semi-public to begin with), really doesn't like being handed an empty array of tasks.

Trying to find a workaround, but it's not abundantly clear.

Relevant source: https://github.com/testdouble/lineman/blob/master/lib/cli/main.coffee#L59-L65

@searls
Copy link

searls commented Jul 14, 2013

Just taking notes as I debug here, just noticed this line in the grunt.task method:

  tasks = task.parseArgs([tasksSpecified ? tasks : 'default']);

Means that when no task is specified to lineman grunt, "default" gets set, so that's what's attempting to run (and probably what is blowing up. I have no idea what our default task is)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment