Answer the question
In order to leave comments, you need to log in
Why is the Object(...) is not defined error thrown?
I am using webpack.
import { Babushka } from "che-to";
console.log(Babushka); // undefined
Babushka(); // TypeError: Object(...) is not a function
Babushka === undefined
Babushka is not a function
import { ANY_UNDEFINED_VARIABLE } from "./hello";
console.log("ANY_UNDEFINED_VARIABLE", ANY_UNDEFINED_VARIABLE);
ANY_UNDEFINED_VARIABLE ();
/***/ "./src/index.js":
/*!**********************!*\
!*** ./src/index.js ***!
\**********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _hello__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hello */ "./src/hello.js");
console.log("ANY_UNDEFINED_VARIABLE", _hello__WEBPACK_IMPORTED_MODULE_0__["ANY_UNDEFINED_VARIABLE"]);
Object(_hello__WEBPACK_IMPORTED_MODULE_0__["ANY_UNDEFINED_VARIABLE"])();
/***/ })
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question