如何解决尝试运行 ./watch
我换了一台新机器,从 Visual Studio 2017 到 Visual Studio 2019 当我运行如下 watch 命令时,我开始收到以下错误,我从一开始就这样做
PS C:\GitSrsCodes\IMS\IMS.Ember> ./watch
ERROR in ./app/application/ApplicationController.js 5:0-42 Module not found: Error: Can’t resolve ‘constants’ in ‘C:\GitSrsCodes\IMS\IMS.Ember\app\application’
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill,you need to: - add a fallback ‘resolve.fallback: { “constants”: require.resolve(“constants-browserify”) }’ - install ‘constants-browserify’ If you don’t want to include a polyfill,you can use an empty module like this: resolve.fallback: { “constants”: false } @ ./.webpack/webpack-results.js 3:46-97 @ ./.webpack/webpack-app.js 1:0-30
ERROR in ./app/components/tuts-tests/tuts-tests.js 5:0-30 Module not found: Error: Can’t resolve ‘os’ in ‘C:\GitSrsCodes\IMS\IMS.Ember\app\components\tuts-tests’
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill,you need to: - add a fallback ‘resolve.fallback: { “os”: require.resolve(“os-browserify/browser”) }’ - install ‘os-browserify’ If you don’t want to include a polyfill,you can use an empty module like this: resolve.fallback: { “os”: false } @ ./.webpack/webpack-results.js 3:9632-9682 @ ./.webpack/webpack-app.js 1:0-30
ERROR in ./node_modules/ember-source/dist/ember.debug.js 6498:16-37 Module not found: Error: Can’t resolve ‘url’ in ‘C:\GitSrsCodes\IMS\IMS.Ember\node_modules\ember-source\dist’
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill,you need to: - add a fallback ‘resolve.fallback: { “url”: require.resolve(“url/”) }’ - install ‘url’ If you don’t want to include a polyfill,you can use an empty module like this: resolve.fallback: { “url”: false } @ ./.webpack/webpack-entry-dev.js 5:0-39
3 errors have detailed information that is not shown.
3 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
And I am getting webpack 5.38.1 compiled with 3 errors and 3 warnings in 23239 ms
如果可能的话,有什么帮助吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。