SailsJs - 无法生成api(使用v0.10.0-rc8)

时间:2014-07-01 08:46:45

标签: frameworks sails.js

我无法使用beta SailsJs(v0.10.0-rc8)进行生成工作。 我试过这个,但没有成功。 任何想法都将不胜感激。

~/dev$ npm -g ls | grep sails ├─┬ sails@0.10.0-rc8 │ ├── grunt-sails-linker@0.9.5 │ ├── sails-build-dictionary@0.10.1 │ ├─┬ sails-disk@0.10.1 │ ├─┬ sails-generate@0.10.3 │ │ ├── sails-generate-adapter@0.10.4 │ │ ├── sails-generate-backend@0.10.13 │ │ ├─┬ sails-generate-controller@0.10.6 │ │ ├── sails-generate-frontend@0.10.18 │ │ ├── sails-generate-generator@0.10.11 │ │ ├── sails-generate-gruntfile@0.10.10 │ │ ├─┬ sails-generate-model@0.10.9 │ │ ├── sails-generate-new@0.10.16 │ │ ├── sails-generate-views@0.10.1 │ │ └── sails-generate-views-jade@0.10.0 │ ├── sails-stringfile@0.3.2 │ ├─┬ sails-util@0.10.2

~/dev$ sails new project info: Created a new Sails app 'project'!

~/dev/project$ sails generate api user error: No generator called 'controller' found; perhaps you meant 'sails generate api controller'? error: No generator called 'model' found; perhaps you meant 'sails generate api model'?

1 个答案:

答案 0 :(得分:0)

我无法通过全新安装Sails来重现这一点。也许你的Sails安装有问题?尝试:

npm cache clear
sudo npm uninstall -g sails
sudo npm install -g sails@beta