vue打包时semver.js版本报错

如图,报错semver.js版本不正确,解决思路是在node_modules/semver.js内,忽略版本检查

'''
// if ANY of the sets match ALL of its comparators, then pass
Range.prototype.test = function(version) {
// ignore the version of this file
return true;
// ignore the version of this file
if (!version)
return false;

if (typeof version === 'string')
version = new SemVer(version, this.options);

for (var i = 0; i < this.set.length; i++) {
if (testSet(this.set[i], version, this.options))
return true;
}
return false;
};
'''

如此,再次npm run build可以正常打包

相关文章:

  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-03
  • 2021-08-21
  • 2021-05-19
猜你喜欢
  • 2021-05-18
  • 2021-09-22
  • 2021-07-11
  • 2021-05-31
  • 2022-12-23
  • 2021-10-29
相关资源
相似解决方案