Closed Enubia closed 1 week ago
nevermind me, I did not execute this script with bunx gulp
but instead tried to run the gulpfile directly with bun gulpfile.js
reopening because I think it could be still valid tho
in case you execute the provided script with either
node gulpfile.js
npx gulp
bunx gulp
it works as intended
but if you try to run the script via
bun gulpfile.js
the aforementioned error occurs
transpiler bug, minimal repro. @dylan-conway
function A() {
}
var A;
still same error did you able to find solution of it @paperdave
Same error when trying to run lib https://github.com/WhiskeySockets/Baileys/issues/586
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
SyntaxError: Cannot declare a var variable that shadows a let/const/class variable: '__importStar'.
@paperdave @dylan-conway
Any update?
Same error when trying to run lib WhiskeySockets/Baileys#586
This is because of transpiling issues - Baileys define an __importStar
function by itself before transpilation - https://github.com/WhiskeySockets/Baileys/blob/f25f83656a7cadbcdaf66b7fea72b9d4b3a72aa0/src/Utils/messages-media.ts#L785-L787
if you clone Baileys and directly run the ts files with Bun, you avoid this error (but you get other errors about missing function from Crypto
)
Fixedin Bun v1.1.21
What version of Bun is running?
1.0.3+cc54b62fac41c0977c7dfc4c6ba550a6408fa15f
What platform is your computer?
Darwin 22.3.0 arm64 arm
What steps can reproduce the bug?
make-error-cause (dependency of gulp-uglify) throws during a gulp build pipeline.
Example to reproduce the issue.
What is the expected behavior?
What do you see instead?
Additional information
No response