通过以下方式安装了全新的Encore安装:
composer require symfony/webpack-encore-pack
yarn install
Ran yarn encore dev
给了我以下输出:
PS C:\ www \ xx> yarn encore dev 纱线运行v1.5.1 $ C:\ www \ xx \ node_modules.bin \ encore dev 正在运行webpack ...
ERROR Failed to compile with 52 errors 11:51:33
These dependencies were not found:
* child_process in ./node_modules/cross-spawn/index.js, ./node_modules/execa/index.js and 1 other
* fork-ts-checker-webpack-plugin in ./node_modules/@symfony/webpack-encore/lib/plugins/forked-ts-types.js
* fs in ./node_modules/@symfony/webpack-encore/lib/WebpackConfig.js, ./node_modules/@symfony/webpack-encore/lib/package-helper.js and 37 others
* module in (webpack)/lib/NormalModule.js, (webpack)/lib/node/NodeTargetPlugin.js
* net in ./node_modules/growly/lib/gntp.js, ./node_modules/node-notifier/lib/checkGrowl.js
* readline in ./node_modules/friendly-errors-webpack-plugin/src/output.js
* spdx-exceptions in ./node_modules/spdx-expression-parse/scan.js
* spdx-license-ids in ./node_modules/spdx-correct/index.js, ./node_modules/spdx-expression-parse/scan.js
* spdx-license-ids/deprecated in ./node_modules/spdx-expression-parse/scan.js
To install them, you can run: npm install --save child_process fork-ts-checker-webpack-plugin fs module net readline spdx-exceptions spdx-license-ids spdx-license-ids/deprecated
error An unexpected error occurred: "Command failed.
Exit code: 2
Command: C:\\WINDOWS\\system32\\cmd.exe
Arguments: /d /s /c C:\\www\\xx\
ode_modules\\.bin\\encore dev
Directory: C:\\www\\xx
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "C:\\www\\xx\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
此外,我尝试手动安装软件包,软件包spdx-license-ids/deprecated
似乎已从Github中删除。
我试图通过以下方式添加其他软件包:
yarn add child_process fork-ts-checker-webpack-plugin fs module net readline spdx-exceptions spdx-lice
nse-ids
虽然我确实在node_modules文件夹中看到了它们,但输出仍然表明未找到某些模块(和其他模块)。
* child_process in ./node_modules/cross-spawn/index.js, ./node_modules/execa/index.js and 2 others
* fs in ./node_modules/@symfony/webpack-encore/lib/WebpackConfig.js, ./node_modules/@symfony/webpack-encore/lib/package-helper.js and 46 others
* spdx-exceptions in ./node_modules/spdx-expression-parse/scan.js
* spdx-license-ids in ./node_modules/spdx-correct/index.js, ./node_modules/spdx-expression-parse/scan.js
* spdx-license-ids/deprecated in ./node_modules/spdx-expression-parse/scan.js
* tslint in ./node_modules/fork-ts-checker-webpack-plugin/lib/index.js
* typescript in ./node_modules/fork-ts-checker-webpack-plugin/lib/index.js, ./node_modules/fork-ts-checker-webpack-plugin/lib/CancellationToken.js and 1 other