Я всегда получаю эту ошибку: Parser "assets\JSAsset" failed to initialize
в консоли. Я использую Node 13.1.0 с nvm. HTML ссылается на простой JS файл S CSS.
<link rel="stylesheet" href="index.scss">
<script src="index.js"></script>
index. html
<html>
<head>
<link rel="stylesheet" href="index.scss">
</head>
<body>
<h1>Hello Parcel!</h1>
<script src="./index.js"></script>
</body>
</html>
index.s css
body {
backround-color: #333;
color: #ddd;
}
index. js
function greet(who) {
console.log(`Hello ${who}!`);
}
greet('Parcel');
Сообщение об ошибке:
‼ Parser "assets\JSAsset" failed to initialize when processing asset "..\Users\zoth\AppData\Roaming\nvm\v13.1.0\node_modules\parcel-bundler\src\builtins\css-loader.js". Threw the following error:
Error: Package exports for 'C:\Users\zoth\AppData\Roaming\nvm\v13.1.0\node_modules\parcel-bundler\node_modules\@babel\helper-compilation-targets' do not define a '.' subpath
at applyExports (internal/modules/cjs/loader.js:485:15)
at resolveExports (internal/modules/cjs/loader.js:508:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:577:20)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879:27)
at Function.Module._load (internal/modules/cjs/loader.js:785:27)
at Module.require (internal/modules/cjs/loader.js:956:19)
× Cannot read property 'length' of undefined
at lineCounter (C:\Users\zoth\AppData\Roaming\nvm\v13.1.0\node_modules\parcel-bundler\src\utils\lineCounter.js:3:30)
at JSPackager.writeModule (C:\Users\zoth\AppData\Roaming\nvm\v13.1.0\node_modules\parcel-bundler\src\packagers\JSPackager.js:127:60)
at async JSPackager.addAsset (C:\Users\zoth\AppData\Roaming\nvm\v13.1.0\node_modules\parcel-bundler\src\packagers\JSPackager.js:88:5)
at async Bundle._addDeps (C:\Users\zoth\AppData\Roaming\nvm\v13.1.0\node_modules\parcel-bundler\src\Bundle.js:250:5)
at async Bundle._addDeps (C:\Users\zoth\AppData\Roaming\nvm\v13.1.0\node_modules\parcel-bundler\src\Bundle.js:247:7)
at async Bundle._package (C:\Users\zoth\AppData\Roaming\nvm\v13.1.0\node_modules\parcel-bundler\src\Bundle.js:219:7)
at async Promise.all (index 0)
at async Bundle.package (C:\Users\zoth\AppData\Roaming\nvm\v13.1.0\node_modules\parcel-bundler\src\Bundle.js:202:5)
at async Promise.all (index 1)
at async Bundle.package (C:\Users\zoth\AppData\Roaming\nvm\v13.1.0\node_modules\parcel-bundler\src\Bundle.js:202:5)