Open NullVoxPopuli opened 6 years ago
yes, I have seen this error in some versions of Parcel that use global Buffer
to keep hashes of filenames, and this Buffer
somehow is undefined during bundling, even if it is actually set initially in Cypress :( I think there is something very funky going on with the way Parcel spawns separate bundling workers. Requires some debugging. What version of Parcel bundler are you running?
My yarn.lock says parcel-bundler is 1.8.1
Why does parcel (or any bundler) need to be involved? Why not just use tsc? Or the prebuilt output of whatever bundler. (This was my technique when trying out puppeteer) ... Would make things much simpler.
I am working on react js project. I am trying to create .exe file but got error when run .exe file.
I followed steps from this link: https://ourcodeworld.com/articles/read/365/how-to-create-a-windows-installer-for-an-application-built-with-electron-framework
Suggest if any solution.
Same here on parcel-bundler@1.10.3
:/
Went all the way back to parcel-bundler@1.7.1
to see if that makes a difference.
Now i'm getting the Cannot resolve dependency './logo.css' at ...
errors instead.
Which is the original problem I was trying to solve using this very plugin :/
Is there any other way to get my CSS loaded from JS?
Worked around it temporarily with the following plugin config under \cypress\plugins\index.js
:
const webpack = require('@cypress/webpack-preprocessor');
module.exports = (on) => {
const options = webpack.defaultOptions;
options.webpackOptions.module.rules.push({
test: /\.css$/,
use: [
'style-loader',
{ loader: 'css-loader', options: { modules: true, importLoaders: 1 } },
'postcss-loader',
],
});
on('file:preprocessor', webpack(options));
};
Also had to install @cypress/webpack-preprocessor
, postcss-loader
, css-loader
, style-loader
, @babel/core
, @babel/preset-env
, babel-loader
and webpack
to make it work.
Several unicorns died along the way...
I had this issue when using .ts
for spec files but .js
for the support file. Changed everything to .ts
now it's fine.
Experiencing the same issue with parcel-bundler@1.11.0. parcel-bundler@1.7.1 does work but npm indicates that version has "high severity vulnerability".
@bahmutov any thoughts on how to go about fixing this issue?
any updates on this issue? can confirm it's working with parcel 1.7.1 but wouldn't mind to use the latest version :D
btw solved by removing this plugin...
A couple of observations in case it's helpful in figuring out a fix:
Buffer
--could this be related?.../@babel/generator/lib/generators/...)
shows up in the stack trace. Maybe this helps explain why renaming everything to .ts
worked for @Xiphe (i.e., maybe Parcel did not need to use Babel for a transform)?
trace from browser:
info:
all I did after installing was change my plugins file to look like this:
the error happens after clicking "run all tests". here is a reproduction: https://github.com/NullVoxPopuli/react-vs-ember/tree/db314cb2186a875f25fe459c88954fe3158c6088