尝试启动Slate时出错:WebpackOptionsValidationError

时间:2019-07-25 14:23:29

标签: npm shopify slate

最近,我使用these steps设置了Slate,以便在本地处理Shopify主题。它工作正常,但过一会儿,我尝试在终端中npm start板岩时出现错误。

我尝试更新npm和node,它们都是最新版本。

这是我在终端中遇到的错误:

starter-theme@1.0.0-alpha.1 start path-to-project 
slate-tools start

WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
         - configuration.entry should be an non-empty object.    
-> Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.
            at webpack (path-to-project-folder/node_modules/webpack/lib/webpack.js:31:9)
            at new DevServer (path-to-project-folder/node_modules/@shopify/slate-tools/tools/asset-server/index.js:21:21)
            at path-to-project-folder/node_modules/@shopify/slate-tools/cli/commands/start.js:48:19 
        npm ERR! code ELIFECYCLE 
        npm ERR! errno 1 
        npm ERR! starter-theme@1.0.0-alpha.1 start: `slate-tools start` 
        npm ERR! Exit status 1 
        npm ERR!  
        npm ERR! Failed at the starter-theme@1.0.0-alpha.1 start script. 
        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

这是slate.config.js文件:

    /* eslint-disable */

// Configuration file for all things Slate.
// For more information, visit https://github.com/Shopify/slate/wiki/Slate-Configuration

const path = require('path');

module.exports = {

  'cssVarLoader.liquidPath': ['src/snippets/css-variables.liquid'],
  'webpack.extend': {
    resolve: {
      alias: {
        jquery: path.resolve('./node_modules/jquery'),
        'lodash-es': path.resolve('./node_modules/lodash-es'),
      },
    },
  },
};

以前有人遇到过这个问题吗,您如何解决呢?

0 个答案:

没有答案