question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError while using strict mode

See original GitHub issue

Hi, I get this stacktrace sometimes (not sure why): TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them Full stacktrace: http://hastebin.com/fuxulemeze.rb

I found a similar issue here that has been fixed: https://github.com/Automattic/mongoose/issues/3046

The fix seems to be to apply this same logic from this commit: https://github.com/Automattic/mongoose/commit/cdda75b998315f571523a9b947230044dfa11139 To the version.js file https://github.com/Automattic/mongoose/blob/master/lib/error/version.js

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
vkarpov15commented, Jun 29, 2016

Woops looks like I didn’t read properly, good catch

0reactions
vkarpov15commented, Aug 23, 2017

@theqabalist opened a new issue ☝️ to track

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strict mode - JavaScript - MDN Web Docs
Strict mode forbids setting properties on primitive values. Accessing a property on a primitive implicitly creates a wrapper object that's ...
Read more >
The cause for TypeError: access to strict mode caller function ...
What's happening is that code that tries to use the caller property of a function is being called by strict-mode code. Example:.
Read more >
Solve JavaScript Error before it happens [strict mode] - Atatus
This is one of the most common errors in JavaScript. Strict mode makes it impossible to accidentally create global variables.
Read more >
Using Strict Mode: Changes in strict mode | Saylor Academy
Without strict mode, setting properties is ignored (no-op), with strict mode, however, a TypeError is thrown. (function() { 'use strict'; false. true =...
Read more >
Restricted in strict mode, js engine: hermes (React Native + ...
Describe the bug Getting an error with React Native when importing a ... which threw an exception: TypeError: Restricted in strict mode, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found