2014-10-10 71 views
0

我正在用“新帆”命令创建一个新应用程序。在运行提升帆时,我在浏览器上收到“未找到”(404)错误。我在本地安装帆&这里是我的节点&帆版本信息帆船升空后浏览器未找到错误,

[email protected]:~/sails/node_modules$ sails --version 
0.10.5 
[email protected]:~/sails/node_modules$ node --version 
v0.10.32 

帆解除与详细的选项给了我这个

[email protected]:~/sails/app$ sails lift --verbose 

info: Starting app... 

warn: Cannot read package.json in the current directory (/home/vsnag/sails/app) 
warn: Are you sure this is a Sails app? 
warn: 
warn: The package.json in the current directory does not list Sails as a dependency... 
warn: Are you sure `/home/vsnag/sails/app` is a Sails app? 
warn: 
verbose: Setting Node environment... 
verbose: Please run `npm install coffee-script` to use coffescript (skipping for now) 
verbose: moduleloader hook loaded successfully. 
...... 
.... 
error: 
------------------------------------------------------------------------ 
grunt-cli: The grunt command line interface. (v0.1.13) 

Fatal error: Unable to find local grunt. 

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 

error: Looks like a Grunt error occurred-- 
error: Please fix it, then **restart Sails** to continue running tasks (e.g. watching for changes in assets) 
error: Or if you're stuck, check out the troubleshooting tips below. 
...... 
... 
verbose: Sending 404 ("Not Found") response 
verbose: res.notFound() :: Could not locate view for error page (sending JSON instead). Details: Could not render view "404". Tried locating view file @ "/home/vsnag/sails/app/views/404". Layout configured as "layout.ejs", so tried using layout @ "/home/vsnag/sails/app/views/layout.ejs") 

我试图解决在this so post建议,但没有用的。

当我比较一个船帆应用在sails docs &我的应用程序中提到的解剖他们似乎并不匹配

[email protected]:~/sails/app$ ls -la 
total 20 
drwxrwxr-x 5 vsnag vsnag 4096 Oct 9 21:36 . 
drwxrwxr-x 4 vsnag vsnag 4096 Oct 10 18:54 .. 
drwxrwxr-x 7 vsnag vsnag 4096 Oct 9 21:36 api 
drwxrwxr-x 4 vsnag vsnag 4096 Oct 9 21:36 config 
drwxrwxr-x 2 vsnag vsnag 4096 Oct 9 21:36 views 

我缺少的Gruntfile.js,README,app.js,的.gitignore, package.json,.sailsrc文件。

有什么建议可能是什么问题?或者说,我很想念任何设置...

回答

0

做出新的空帆的应用程序(在你的主文件夹)与:

$> sails new myapp 

不是复制您的API,视图和配置在这个“MYAPP” - 文件夹,运行sails lift再次

+0

我想这一点,没有太大的不同的问题是“帆新的”后Gruntfile.js。 README,app.js,.gitignore,package.json,.sailsrc根本不会被复制/创建,理想情况是应该发生sails new命令的一部分。 – vsnag 2014-10-11 04:55:02

+0

我将节点降级到v0.10.25,并且sails工作。 – vsnag 2014-10-11 11:36:40

0

检查importer.less

我无意中包含的东西是不是在那里(缺少的文件夹),并修复它后,它的工作。 (:

如果它不检查你的pipeline.js,看看是否已经注入了正确的文件

相关问题