![](/img/trans.png)
[英]error when using browserify with a module written in coffeescript
[英]“Cannot GET /” error using Roots - CoffeeScript
我正在使用Roots開發應用程序,因為我運行roots watch
命令,然后它成功編譯並打開localhost:1111
頁面,但出現以下錯誤:
Cannot GET /
這是我的app.coffee文件的外觀,盡管我在SOF中尋找了此修復程序,但在這種情況下它們似乎都不起作用。
axis = require 'axis'
rupture = require 'rupture'
autoprefixer = require 'autoprefixer-stylus'
js_pipeline = require 'js-pipeline'
css_pipeline = require 'css-pipeline'
module.exports =
ignores: ['readme.md', '**/layout.*', '**/_*', '.gitignore', 'ship.*conf']
extensions: [
js_pipeline(files: 'assets/js/*.coffee'),
css_pipeline(files: 'assets/css/*.styl')
]
stylus:
use: [axis(), rupture(), autoprefixer()]
sourcemap: true
'coffee-script':
sourcemap: true
jade:
pretty: true
因為這是CoffeeScript而不是JS,這是否是另一種解決方案?
所以事實證明,在我完成roots new project-name
之后,我需要cd project-name
roots new project-name
,然后只有roots watch
可以工作。
這樣的菜鳥犯錯,不過是一個很好的教訓。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.