(v2.18.1) dev
does not work with yarn v2
#1878
-
I run
According to the callstack this error occurs in these lines in static resolveVirtual(p) {
const match = p.match(VIRTUAL_REGEXP); // <-- This is where the error occurs.
if (!match || (!match[3] && match[5])) return p;
const target = ppath.dirname(match[1]);
if (!match[3] || !match[4]) return target;
// ...
} When I insert
This is my module.exports = {
exclude: [
'**/node_modules/**/*',
'**/__test__/*',
'**/*.@(spec|test).@(js|mjs)',
'**/.pnp.js',
],
plugins: [
[
'@snowpack/plugin-run-script',
{ cmd: 'tsc --noEmit', watch: '$1 --watch' },
],
'@snowpack/plugin-babel',
[
'@snowpack/plugin-build-script',
{ cmd: 'postcss', input: ['.pcss'], output: ['.css'] },
],
],
mount: {
web_modules: '/web_modules',
'src/public': '/',
'src/styles': '/css',
'src/scripts': '/js',
},
alias: {
'@lib': './src/lib',
'@web_modules': './web_modules',
},
installOptions: {
installTypes: true,
},
install: [],
devOptions: {
bundle: false,
},
}; With v2.17.1 it works with the same configuration. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
This appears to be a yarn bug. fs.readFile supports file URLs, but it looks like Yarn does not. Can you update yarn and retry? Also, if still broken when you update yarn: What version of Node.js are you on? |
Beta Was this translation helpful? Give feedback.
-
We just got bit by this as well and have opened an issue with yarn directly: yarnpkg/berry#2229 |
Beta Was this translation helpful? Give feedback.
-
This has been fixed in yarnpkg/berry#2291 |
Beta Was this translation helpful? Give feedback.
This has been fixed in yarnpkg/berry#2291