最近,我使用这些步骤设置了 Slate ,以便在本地处理我的 Shopify 主题。它工作得很好,但过了一段时间我npm start
在终端中尝试 Slate 时出现错误。
我试过更新 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'),
},
},
},
};
以前有没有人遇到过这个问题,你是如何解决的?