2017-09-04 146 views
0

我在玩React_on_rails,在克隆他們的例子之後,我無法讓它與webpacker_lite一起工作。當我運行開發服務器我得到這個錯誤:如何爲webpackerlite創建manifest.json文件

`WebpackerLite::FileLoader::NotFoundError in Pages#index 
    WebpackerLite can't find the manifest file: /FILE PATH/react-webpack-rails-tutorial/public/webpack/development/manifest.json 
    Possible causes: 
     1. You have not invoked webpack. 
     2. You have misconfigured WebpackerLite's config/webpacker_lite.yml file. 
     3. Your Webpack configuration is not creating a manifest. 
` 

我已經安裝了的WebPack艙單,插件並補充說:

var ManifestPlugin = require('webpack-manifest-plugin'); 

module.exports = { 
    // ... 
    plugins: [ 
     new ManifestPlugin() 
    ] 
}; 

爲的WebPack艙單,插件的文件說,這將產生一個manifest.json,但它看起來不像它。

回答

0

我們有一天這個問題。

使用foreman start -f Procfile.dev啓動服務器,而不是rails s

您可以檢出,我們如何解決這個問題。如果,我here

我們嘗試了一些事情,包括更新節點,NPM和紗線所以如果上述不起作用確保你已經更新了這些依賴於這個的包。