Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{ TypeError: assert.strict is not a function #92

Closed
OmgImAlexis opened this issue Mar 23, 2020 · 12 comments
Closed

{ TypeError: assert.strict is not a function #92

OmgImAlexis opened this issue Mar 23, 2020 · 12 comments

Comments

@OmgImAlexis
Copy link

lmx broker error: Uncaught Exception event occurred in Broker process: { TypeError: assert.strict is not a function
    at new Broker (/usr/local/bin/proxy/node_modules/live-mutex/dist/broker.js:65:16)
    at Object.<anonymous> (/usr/local/bin/proxy/app/index.js:17:16)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/bin/proxy/bin/www:4:26)
  [stack]: 'TypeError: assert.strict is not a function\n    at new Broker (/usr/local/bin/proxy/node_modules/live-mutex/dist/broker.js:65:16)\n    at Object.<anonymous> (/usr/local/bin/proxy/app/index.js:17:16)\n    at Module._compile (module.js:652:30)\n    at Object.Module._extensions..js (module.js:663:10)\n    at Module.load (module.js:565:32)\n    at tryModuleLoad (module.js:505:12)\n    at Function.Module._load (module.js:497:3)\n    at Module.require (module.js:596:17)\n    at require (internal/module.js:11:18)\n    at Object.<anonymous> (/usr/local/bin/proxy/bin/www:4:26)',
  [message]: 'assert.strict is not a function' }
@OmgImAlexis
Copy link
Author

This whole commit may need to be fixed. cb7b296

I'd highly suggest to add testing to your code before pushing as well as proper commit messages. This is a really good read on that subject.

@OmgImAlexis
Copy link
Author

OmgImAlexis commented Mar 23, 2020

Did you mean to use assert() instead maybe? Looking at the typings it shows assert.strict() to be the same as assert() itself. I'm guessing your tsconfig isn't correctly setup to convert it back.

> import * as assert from 'assert';
{}
> 4
4
> assert
{ fail: [Function: fail],
  AssertionError: [Function: AssertionError],
  ok: 
   { [Function: ok]
     fail: [Function: fail],
     AssertionError: [Function: AssertionError],
     ok: [Circular],
     equal: [Function: equal],
     notEqual: [Function: notEqual],
     deepEqual: [Function: deepEqual],
     deepStrictEqual: [Function: deepStrictEqual],
     notDeepEqual: [Function: notDeepEqual],
     notDeepStrictEqual: [Function: notDeepStrictEqual],
     strictEqual: [Function: strictEqual],
     notStrictEqual: [Function: notStrictEqual],
     throws: [Function: throws],
     doesNotThrow: [Function: doesNotThrow],
     ifError: [Function: ifError] },
  equal: [Function: equal],
  notEqual: [Function: notEqual],
  deepEqual: [Function: deepEqual],
  deepStrictEqual: [Function: deepStrictEqual],
  notDeepEqual: [Function: notDeepEqual],
  notDeepStrictEqual: [Function: notDeepStrictEqual],
  strictEqual: [Function: strictEqual],
  notStrictEqual: [Function: notStrictEqual],
  throws: [Function: throws],
  doesNotThrow: [Function: doesNotThrow],
  ifError: [Function: ifError],
  default: 
   { [Function: ok]
     fail: [Function: fail],
     AssertionError: [Function: AssertionError],
     ok: [Circular],
     equal: [Function: equal],
     notEqual: [Function: notEqual],
     deepEqual: [Function: deepEqual],
     deepStrictEqual: [Function: deepStrictEqual],
     notDeepEqual: [Function: notDeepEqual],
     notDeepStrictEqual: [Function: notDeepStrictEqual],
     strictEqual: [Function: strictEqual],
     notStrictEqual: [Function: notStrictEqual],
     throws: [Function: throws],
     doesNotThrow: [Function: doesNotThrow],
     ifError: [Function: ifError] } }

@ORESoftware
Copy link
Owner

ORESoftware commented Mar 23, 2020

yeah it was tested and also compiled with TS too, hmm, weird, which node.js version are you on?

@ORESoftware
Copy link
Owner

my guess is that you are on an old node version? node 7 does not have assert.strict, but node 8+ should.

@OmgImAlexis
Copy link
Author

I was on a version of 8. Updated to 12 and still got the error.

@ORESoftware
Copy link
Owner

got it, can you copy the contents of this file on your machine

/usr/local/bin/proxy/node_modules/live-mutex/dist/broker.js:65:16

to here?

@ORESoftware
Copy link
Owner

ORESoftware commented Mar 23, 2020

something might be up with your node version, here is the output I get for node version 8:

> assert
{ [Function: ok]
  fail: [Function: fail],
  AssertionError: [Function: AssertionError],
  ok: [Circular],
  equal: [Function: equal],
  notEqual: [Function: notEqual],
  deepEqual: [Function: deepEqual],
  deepStrictEqual: [Function: deepStrictEqual],
  notDeepEqual: [Function: notDeepEqual],
  notDeepStrictEqual: [Function: notDeepStrictEqual],
  strictEqual: [Function: strictEqual],
  notStrictEqual: [Function: notStrictEqual],
  throws: [Function: throws],
  rejects: [AsyncFunction: rejects],
  doesNotThrow: [Function: doesNotThrow],
  doesNotReject: [AsyncFunction: doesNotReject],
  ifError: [Function: ifError],
  strict: 
   { [Function: strict]
     fail: [Function: fail],
     AssertionError: [Function: AssertionError],
     ok: [Circular],
     equal: [Function: strictEqual],
     notEqual: [Function: notStrictEqual],
     deepEqual: [Function: deepStrictEqual],
     deepStrictEqual: [Function: deepStrictEqual],
     notDeepEqual: [Function: notDeepStrictEqual],
     notDeepStrictEqual: [Function: notDeepStrictEqual],
     strictEqual: [Function: strictEqual],
     notStrictEqual: [Function: notStrictEqual],
     throws: [Function: throws],
     rejects: [AsyncFunction: rejects],
     doesNotThrow: [Function: doesNotThrow],
     doesNotReject: [AsyncFunction: doesNotReject],
     ifError: [Function: ifError],
     strict: [Circular] } }
> 

@ORESoftware
Copy link
Owner

@OmgImAlexis any word on this bird?

@OmgImAlexis
Copy link
Author

Now try with typescript.

@ORESoftware
Copy link
Owner

how'd it go?

@ORESoftware
Copy link
Owner

any conclusion on this one? will close o/w, pls lmk

@OmgImAlexis
Copy link
Author

It was an issue. Like I said try with typescript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants