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.

import(..) returns undefinded instead of results of resolution

See original GitHub issue

When the import(..) function is called the results are not returned, but a undefined This leads to problems when using trying to use this package with cypress.

The for loop does not return the results of the promises https://github.com/pkosiec/mongo-seeding/blob/master/core/src/importer/index.ts#L25-L28

If we would use a map and return instead of the for loop the issue could be solved. What do you think?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gerwinbrunnercommented, Mar 24, 2020

Yeah, sure - the workaround is fine for me.

0reactions
pkosieccommented, Mar 24, 2020

I wouldn’t treat it as a workaround, but in this case as a proper solution 🙂 Anyway, thanks for the openness and good open source attitude 🙂 Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

import returns undefined instead of react component while ...
Problem lays in how import of dependencies is done. In this case DepartmentSelector imports a Form which imports FormElement and FormElement ...
Read more >
import - JavaScript - MDN Web Docs - Mozilla
The static import declaration is used to import read-only live bindings ... in non-module contexts, use the dynamic import syntax instead.
Read more >
runOnJS return undefined instead of the returned value of ...
Description. I am running runOnJS function in useDerivedValue hook this way. import React from 'react'; import {SafeAreaView, StyleSheet, Button} from ...
Read more >
Cannot Read Property Length of Undefined in JavaScript
The JavaScript TypeError: Cannot read property 'length' of undefined occurs when the length property is read on an undefined variable.
Read more >
Documentation - Modules - TypeScript
Importing is just about as easy as exporting from a module. ... Explicitly pull out a value (getResponse) and a type (APIResponseType). import...
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