Open jorismak opened 2 years ago
@jorismak
I also got the similar error. But in my case error only occurred in GitHub Actions.
I applied patch to call console.log()
to exec()
of node_modules/mini-css-extract-plugin/dist/loader.js
to get code line which error reported.
'Cannot read property 'prototype' of undefined
' caused in below code:
var DOM_EXCEPTION = 'DOMException';
var Error = getBuiltIn('Error');
var NativeDOMException = getBuiltIn(DOM_EXCEPTION);
var $DOMException = function DOMException() {
...
};
var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype; // <--- Here
This is the code of core-js
.
I have 2 projects:
I compared installed packages.
npm ls -t core-js
<project1>
βββ¬ vuepress@1.9.7
βββ¬ @vuepress/core@1.9.7
βββ¬ @vue/babel-preset-app@4.5.15
β βββ core-js@3.20.3 deduped
βββ core-js@3.20.3
npm ls -t core-js
<project2>
βββ¬ vuepress@1.9.7
βββ¬ @vuepress/core@1.9.7
βββ¬ @vue/babel-preset-app@4.5.19
β βββ core-js@3.25.3 deduped
βββ core-js@3.25.3
I noticed the difference of version of @vue/babel-preset-app
, and I tried deployments by fixing installed version like below:
{
"devDependencies": {
"@vue/babel-preset-app": "4.5.18"
}
}
Results were
@vue/babel-preset-app |
build |
---|---|
4.5.19 |
Error |
4.5.18 |
OK |
4.5.17 |
OK |
4.5.16 |
OK |
4.5.15 |
OK |
You may avoid the build error by fixing version of @vue/babel-preset-app
.
4.5.19
was released on 2022/06/28, a few days before you reported this issue.
https://github.com/vuejs/vue-cli/releases/tag/v4.5.19 https://github.com/vuejs/vue-cli/commit/c7fa1cf
Note that I don't understand why this is the problem.
@smori1983 thxοΌuse 4.5.18 solved the problemοΌI have this problem because I am using windows.atob, which is a little strange.
Bug report
Steps to reproduce
What is expected?
Successful build when a project is just scaffolded.
What is actually happening?
and this goes on for quite a bit, with lots of repeated blocks of errors.
Other relevant information
npx vuepress info
in my VuePress project:(from inside the generated
docs
directory)The same thing happens when I try it with yarn btw.
Is probably related / the same as #3061