ljharb / get-intrinsic

Get and robustly cache all JS language-level intrinsics at first require time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them

Ixorasoft opened this issue · comments

When using express.js in a typescript project, I have a problem in strict mode:

Exception has occurred: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
at myProject\node_modules\get-intrinsic\index.js:32:14
at Object. (myProject\node_modules\get-intrinsic\index.js:42:3)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object. (myProject\node_modules\side-channel\index.js:3:20)
at Module._compile (node:internal/modules/cjs/loader:1159:14)

in code:

var ThrowTypeError = $gOPD
	? (function () {
		try {
			// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
/*  THIS->   */	  arguments.callee; // IE 8 does not throw here
			return throwTypeError;
		} catch (calleeThrows) {
			try {
				// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
				return $gOPD(arguments, 'callee').get;
			} catch (gOPDthrows) {
				return throwTypeError;
			}
		}
	}())
	: throwTypeError;

Which version of node are you getting this error from?

I'm sorry, I stepped. Please close this task.

alrighty, still not sure how you got this error :-)

I turned on mode show and stop All Exceptions in IDE )))

ah - yeah, that mode is pretty useless in browsers too, because it stops on handled errors too.