javascript - 尝试在反应应用程序客户端上构建或启动纱线时出现大问题
问题描述
我正在尝试构建一个反应应用程序,但它不再工作了,我真的不知道它是如何发生的!我真的需要你帮忙!这是尝试构建纱线后我在终端中遇到的错误:
/var/www/html/Portfolio/server/client $ yarn build
yarn run v1.12.1
warning package.json: No license field
warning Skipping preferred cache folder "/home/mint/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-999".
$ node_modules/cross-env/src/bin/cross-env.js NODE_ENV=production webpack --config config/webpack.prod.js
Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
- options[0] misses the property 'patterns'. Should be:
[non-empty string | object { from, to?, context?, globOptions?, toType?, force?, flatten?, transform?, cacheTransform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item)
ValidationError: Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
at validate (/var/www/html/Portfolio/server/client/node_modules/schema-utils/dist/validate.js:96:11)
at new CopyPlugin (/var/www/html/Portfolio/server/client/node_modules/copy-webpack-plugin/dist/index.js:24:30)
at Object.<anonymous> (/var/www/html/Portfolio/server/client/config/webpack.common.js:22:5)
at Module._compile (/var/www/html/Portfolio/server/client/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (/var/www/html/Portfolio/server/client/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/var/www/html/Portfolio/server/client/config/webpack.prod.js:3:16)
at Module._compile (/var/www/html/Portfolio/server/client/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (/var/www/html/Portfolio/server/client/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
解决方案
推荐阅读
- php - CakePHP 将 MySQL 日期时间转换为 Unix 时间戳
- r - 我的正常曲线没有正确绘制直方图
- python - 如何从矩阵中提取前 x 位?
- protractor - 我们可以在终端中指定最大实例吗?
- laravel - 如何在 Laravel 中组合两个数据透视表?
- r - dplyr - 将分组变量与分组变量的子集进行比较
- java - 这段代码的控制流图到底是什么样子的?
- java - 如何在 @RequestParam 中将默认值设置为 LocalDateTime
- python-3.x - 使用 Python 3.x 连接到 Onedrive 时出错
- python - Python 'test' 模块产生“TypeError:'module' 对象不可调用”