\art-template\lib\runtime.js doesn't exist
Parsed request is a module
using description file: d:\player\package.json (relative path: ./src/template)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
d:\player\src\template\node_modules doesn't exist or is not a directory
d:\player\src\node_modules doesn't exist or is not a directory
looking for modules in d:\player\node_modules
single file module
No description file found in d:\\node_modules\art-template\lib or above
no extension
Field 'browser' doesn't contain a valid alias configuration
d:\\node_modules\art-template\lib\runtime.js doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
d:\\node_modules\art-template\lib\runtime.js.js doesn't exist
.less
Field 'browser' doesn't contain a valid alias configuration
d:\\node_modules\art-template\lib\runtime.js.less doesn't exist
d:\\node_modules\art-template\lib\runtime.js doesn't exist
d:\node_modules doesn't exist or is not a directory
d:\node_modules doesn't exist or is not a directory
d:\node_modules doesn't exist or is not a directory
d:\node_modules doesn't exist or is not a directory
解决办法:
修改webpack配置文 webpack\prod.config.js 文章来源:https://www.toymoban.com/news/detail-823682.html
resolve: {
modules: ['node_modules'],
extensions: ['.js', '.less'],
fallback: {
dgram: false,
fs: false,
net: false,
tls: false,
},
preferRelative: true,
},
添加了一行 :preferRelative: true,文章来源地址https://www.toymoban.com/news/detail-823682.html
到了这里,关于art-template, node_modules doesn‘t exist or is not a directory的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!