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.

Inso run test fails, ERROR: Cannot read property 'now' of undefined

See original GitHub issue

Describe the bug Running tests with inso cli inso run test results into an error.

> inso run test                    
✔ Select a document or unit test suite · <collection name>
✔ Select an environment · Staging - <env name>
This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills
This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills

 ERROR  Cannot read property 'now' of undefined                                                                                                                                                                                                                                                                       

  at Object.<anonymous> (/usr/lib/node_modules/insomnia-inso/node_modules/insomnia-send-request/dist/index.js:32481:98)
  at Object.<anonymous> (/usr/lib/node_modules/insomnia-inso/node_modules/insomnia-send-request/dist/index.js:32491:30)
  at __webpack_require__ (/usr/lib/node_modules/insomnia-inso/node_modules/insomnia-send-request/dist/index.js:21:30)
  at Object.<anonymous> (/usr/lib/node_modules/insomnia-inso/node_modules/insomnia-send-request/dist/index.js:32460:20)
  at __webpack_require__ (/usr/lib/node_modules/insomnia-inso/node_modules/insomnia-send-request/dist/index.js:21:30)
  at Object.<anonymous> (/usr/lib/node_modules/insomnia-inso/node_modules/insomnia-send-request/dist/index.js:32169:59)
  at Object.<anonymous> (/usr/lib/node_modules/insomnia-inso/node_modules/insomnia-send-request/dist/index.js:32450:30)
  at __webpack_require__ (/usr/lib/node_modules/insomnia-inso/node_modules/insomnia-send-request/dist/index.js:21:30)
  at Object.<anonymous> (/usr/lib/node_modules/insomnia-inso/node_modules/insomnia-send-request/dist/index.js:32148:20)
  at __webpack_require__ (/usr/lib/node_modules/insomnia-inso/node_modules/insomnia-send-request/dist/index.js:21:30)

ℹ To view tracing information, re-run inso with --verbose

To Reproduce Steps to reproduce the behavior:

  1. Go to command line
  2. execute inso cli
  3. select a design document containing tests
  4. select an environment
  5. execute the tests
  6. See the error described above

Expected behavior Inso CLI runs the tests as expected without throwing errors.

Desktop (please complete the following information):

  • OS: Linux (Manjaro Linux 21.0.7)
  • Installation Method: npm
  • App Version v2.3.0

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
develohpandacommented, Nov 9, 2021

Oh that’s a good point^. Inso only works (currently) with Node 12. We’ve released single-executable binaries which you can access from GitHub Releases if you want to skip installing via NPM.

1reaction
glanchowcommented, Oct 16, 2021

I had the same problem with all node v16 versions, but it worked with v14

nvm install v14.18.1
Now using node v14.18.1 (npm v6.14.15)
npm install -g insomnia-inso
inso run test
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read properties of undefined (reading 'transformFile ...
Now when I run npx react-native info it tells me the correct node version(16.13.1) and all my projects are running in the emulator...
Read more >
Unit tests - Mattermost Developers
Review our guidelines for unit testing for your Mattermost webapp, including a guide on how to do ... TypeError: Cannot read property 'filter'...
Read more >
an error was thrown in afterall cannot read property - You.com
The tests run and fail and then this error is thrown in jest 22. TypeError: Cannot read property 'addExpectationResult' of undefined at Env.fail...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Intermittent test suite failures, TypeError: Cannot read property ...
This error "TypeError: Object #<Sockit> has no method 'setPollTimeout'" is that we have a "bad" binary for sockit.node NodeJS binary module. If you...
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