-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running 'parcel build' creates js file with errors #5091
Comments
Which Parcel version are you using? |
@mischnic I am using parcel 2.. I had a nightly build installed, then I updated to the latest version by using the following command: |
@mischnic I checked a bit more my stuff and I highly believe that this is a bug in parcel 2, since as said I have another app which uses create-react-app and imports the same version of such package and that produces a minified production version just fine. If I can help you out by providing any further information just let me know, since at this stage I am stuck to be honest. |
Please provide some code sample. I've tried the example code on https://www.telerik.com/kendo-react-ui/components/inputs/radiobutton/ but that works fine |
Hmm that is very strange, so you tried running 'parcel build' and the generated js file had no errors? Since for me once I try to import the kendo-react-inputs like for example: index.js (this is the entry point)
App.js (this is the component)
package.json (note that i reverted the parcel version back to the one I had prior to this issue)
Such code produces the below error when I run the command: 'yarn build' |
@mischnic please note that after further investigation I noticed that if I add the flag: |
@mischnic any news on this please? |
Sorry for the long delay, but the example you posted works fine for me. |
I'm running into the exact same problem with adding Unfortunately it's not possible for me to post the code as it's not open source. |
Running into this with parcel-2.0.0-beta.2 in https://github.com/TypeStrong/atom-typescript/. The error is thrown from this code fragment (non-minified): // ASSET: node_modules/inherits/inherits_browser.js
var $c6c7720fe577540e015650540ece1eb7$exports, $c6c7720fe577540e015650540ece1eb7$executed = false;
function $c6c7720fe577540e015650540ece1eb7$exec() {
$c6c7720fe577540e015650540ece1eb7$exports = {};
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
$c6c7720fe577540e015650540ece1eb7$exports = function inherits(ctor, superCtor) {
if (superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
}
};
} else { Specifically, Stack Trace
I am attaching an unminified Beta 1 was working fine. |
Here is the relevant upstream issue: isaacs/inherits#38 |
Ping. I've ran into this again on another project. Any updates? |
FWIW, after a little more investigation, I've tracked this down to the $1eb49f8fe789659e20000b0d5afc791a$var$EE = {}; wherein when built with parcel 2.0.0-beta.1 we instead see in the corresponding place $b1d16ad7d6917ec5b6516c1ffa761e$var$EE = _events.EventEmitter; However, this doesn't seem to be related to any changes in the var EE = require('events').EventEmitter indeed, this line has been last touched 6 years ago Curiously, at the top of the bundle where the issue manifests, we see Building with |
@lierdakil The issue seems like #6242. Have you tried the latest nightly to see if this is solved? |
Considering I apparently lack a way to consistently reproduce the issue, since it manifested in beta1 but not beta2 less than an hour ago, I regrettably can't confirm whether it's fixed anywhere or not. |
I have the below scripts in my package.json:
Now when I run 'yarn start' everything is fine but when I run 'yarn build', the index.js produced by parcel in the dist folder is throwing the below error in the google chrome console:
Uncaught TypeError: Object prototype may only be an Object or null: undefined
I am thinking maybe something is going wrong during the minification process but I am a bit lost on how to debug such issue.
I noticed that the issue is being caused when importing the '@progress/kendo-react-inputs' package like below:
import { MaskedTextBox, RadioGroup } from '@progress/kendo-react-inputs';
But I also have another app that uses create-react-app rather than parcel and imports such package and that works well
Can someone please shed some light on this?
Thanks a lot!
The text was updated successfully, but these errors were encountered: