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;node

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

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

如此,再次npm run build能夠正常打包

相關文章
相關標籤/搜索