2014-10-10 72 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,看看是否已經注入了正確的文件

相關問題