Skip to content

Type Error when importing from a npmjs library #29

@iAbhinav

Description

@iAbhinav

I have an NX workspace setup and I have been using memo-decorator for quite a bit now.

I have libraries that use memo-decorator, and applications that use those libs. Everything works perfect inside my NX workspace.

But when I am trying to publish my library to npm and then import it in an external project.
I am getting the following errors.

[Error] TypeError: memo_decorator__WEBPACK_IMPORTED_MODULE_1__ is not a function. (In 'memo_decorator__WEBPACK_IMPORTED_MODULE_1__()', 'memo_decorator__WEBPACK_IMPORTED_MODULE_1__' is an instance of Object)
	(anonymous function) (vendor.js:119720:96)
	__webpack_require__ (runtime.js:23)
	(anonymous function) (vendor.js:116631:103)
	__webpack_require__ (runtime.js:23)
	(anonymous function) (vendor.js:116822:116)
	__webpack_require__ (runtime.js:23)
	(anonymous function) (vendor.js:117104:106)
	__webpack_require__ (runtime.js:23)
	(anonymous function) (vendor.js:115324:109)
	__webpack_require__ (runtime.js:23)
	(anonymous function) (main.js:70:93)
	__webpack_require__ (runtime.js:23)
	(anonymous function) (main.js:389:93)
	__webpack_require__ (runtime.js:23)
	(anonymous function) (runtime.js:57)
	(anonymous function) (main.js:664)
	webpackJsonpCallback (runtime.js:316)
	webpackJsonpCallback
	Module Code (main.js:1:84)
	evaluate
	moduleEvaluation
	(anonymous function)
	promiseReactionJob

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions