Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问我构建模块的时候报错是什么问题? #25

Closed
elthon opened this issue Aug 7, 2013 · 4 comments
Closed

请问我构建模块的时候报错是什么问题? #25

elthon opened this issue Aug 7, 2013 · 4 comments

Comments

@elthon
Copy link

elthon commented Aug 7, 2013

版本信息:
elthon-mac:gallery elthon$ grunt --version
grunt-cli v0.1.9
grunt v0.4.1

执行npm install后下载的模块
elthon-mac:gallery elthon$ ls node_modules/
async expect.js grunt mocha request seajs
elthon-mac:gallery elthon$ cd json

进入“json”模块进行构建,报:Object # has no method 'loadGlobalTasks', 是我的grunt版本问题么?

elthon-mac:json elthon$ grunt build -v
Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK
Loading "Gruntfile.js" tasks...ERROR

TypeError: Object # has no method 'loadGlobalTasks'
at Object.module.exports (/Users/elthon/Projects/oss/cmdjs/gallery/json/Gruntfile.js:25:9)
at loadTask (/Users/elthon/Projects/oss/cmdjs/gallery/node_modules/grunt/lib/grunt/task.js:312:10)
at Task.task.init (/Users/elthon/Projects/oss/cmdjs/gallery/node_modules/grunt/lib/grunt/task.js:424:5)
at Object.grunt.tasks (/Users/elthon/Projects/oss/cmdjs/gallery/node_modules/grunt/lib/grunt.js:113:8)
at Object.module.exports as cli
at Object. (/usr/local/lib/node_modules/grunt-cli/bin/grunt:41:20)
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)

Running tasks: build
Warning: Task "build" not found. Use --force to continue.

Aborted due to warnings.

@elthon
Copy link
Author

elthon commented Aug 7, 2013

用 grunt wrap 也是一样的错误。

popomore added a commit that referenced this issue Aug 7, 2013
@popomore
Copy link
Contributor

popomore commented Aug 7, 2013

不应该是 warp,改了,用 spm build 再试试

@elthon
Copy link
Author

elthon commented Aug 7, 2013

嗯, 应该是用spm build命令,我是用的grunt build,所以出错了。 那首页的那个Readme文档是否应该要改一下了,那里写的是进入目录执行grunt build。

@popomore
Copy link
Contributor

popomore commented Aug 7, 2013

@popomore popomore closed this as completed Aug 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants