-
-
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 |
fwiw, grunt --help
works fine from a vanilla grunt directory:
davidmosher@localhost:~/code/lineman (master) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [00:18:25]
$ grunt --help
Grunt: The JavaScript Task Runner (v0.4.1)
Usage
grunt [options] [task [task ...]]
Options
--help, -h Display this help text.
--base Specify an alternate base path. By default, all file paths are
relative to the Gruntfile. (grunt.file.setBase) *
--no-color Disable colored output.
--gruntfile Specify an alternate Gruntfile. By default, grunt looks in the
current or parent directories for the nearest Gruntfile.js or
Gruntfile.coffee file.
--debug, -d Enable debugging mode for tasks that support it.
--stack Print a stack trace when exiting with a warning or fatal error.
--force, -f A way to force your way past warnings. Want a suggestion? Don't
use this option, fix your code.
--tasks Additional directory paths to scan for task and "extra" files.
(grunt.loadTasks) *
--npm Npm-installed grunt plugins to scan for task and "extra" files.
(grunt.loadNpmTasks) *
--no-write Disable writing files (dry run).
--verbose, -v Verbose mode. A lot more information output.
--version, -V Print the grunt version. Combine with --verbose for more info.
--completion Output shell auto-completion rules. See the grunt-cli
documentation for more information.
Options marked with * have methods exposed via the grunt API and should instead
be specified inside the Gruntfile wherever possible.
Available tasks
common runs linemans common lifecycle tasks
configure Extends Lineman's config with the user-defined configuration &
file globs
dev runs linemans dev lifecycle tasks
dist runs linemans dist lifecycle tasks
images copy images to dist/img
clean Clean files and folders. *
coffee Compile CoffeeScript files into JavaScript *
concat Concatenate files. *
handlebars Compile handlebars templates and partials. *
jshint Validate files with JSHint. *
jst Compile underscore templates to JST file *
less Compile LESS files to CSS *
cssmin Minify CSS files *
uglify Minify files with UglifyJS. *
watch Run predefined tasks whenever watched files change.
pages generates static HTML files *
server static file & api proxy development server
spec-ci run specs in ci mode
spec run specs
webfonts copy webfonts to dist/webfonts
Tasks run in the order specified. Arguments may be passed to tasks that accept
them by using colons, like "lint:files". Tasks marked with * are "multi tasks"
and will iterate over all sub-targets if no argument is specified.
The list of available tasks may change based on tasks directories or grunt
plugins specified in the Gruntfile or via command-line options.
For more information, see http://gruntjs.com/
however when cd'ing into a lineman project, grunt --help
yields
grunt-cli: The grunt command line interface. (v0.1.9)
If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:
http://gruntjs.com/getting-started
@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.
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
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)
Looks like something is wrong with Grunt. I'm getting the same error on a pure-grunt repo, without lineman at all.