簡體   English   中英

使用根出現“無法獲取/”錯誤-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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM