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: _c69‍.r is not a function` when trying to run the bootstrapped schema...

See original GitHub issue

hey there 👋

thanks for putting this together 👍

i’m working thru the example and hitting some weird error(s). i suspect it’s something having to do with that ol’ bear trap import in node 🤦‍♂️

here’s the error i see when running w/ esm via node ./src/server.js

/graphhhqllll/node_modules/mongo-graphql-starter/node_modules/mongodb/lib/mongo_client.js:1
TypeError: _c69‍.r is not a function
    at Object.<anonymous> (/graphhhqllll/node_modules/mongo-graphql-starter/node_modules/mongodb/lib/mongo_client.js:1)
    at Object.<anonymous> (/graphhhqllll/node_modules/mongo-graphql-starter/node_modules/mongodb/lib/mongo_client.js:1)
    at Module.<anonymous> (/graphhhqllll/node_modules/esm/esm.js:1)

when i run w/o esm, i get:

/graphhhqllll/src/graphQL/resolver.js:1
(function (exports, require, module, __filename, __dirname) { import GraphQLJSON from 'graphql-type-json';
                                                              ^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    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> (/graphhhqllll/src/server.js:5:19)

esm settings from package.json:

  "esm": {
    "cjs": true,
    "mode": "auto",
    "debug": true
  }

dependencies from package.json:

  "dependencies": {
    "esm": "^3.0.55",
    "express": "^4.16.3",
    "express-graphql": "^0.6.12",
    "graphql": "^0.13.2",
    "graphql-tools": "^3.0.4",
    "mongodb": "^3.1.0"
  }

any suggestions you could throw my way would be much appreciated 🙏

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
arackafcommented, Jun 30, 2018

This test project is on latest mongo-graphql-starter - everything generates fine, even after a fresh npm install

https://github.com/arackaf/test-mongo-graphql-starter

1reaction
busticatedcommented, Jul 1, 2018

nice - i’m up and running using v0.6.19 - thanks a bunch 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Uncaught TypeError: undefined is not a function" when ...
I am having trouble calling bootstrap-java functions from my rails application. Currently I am trying to get a simple example with some tooltips ......
Read more >
typescript TypeError: js_schema_1.default is not a function #49
This typescript error seems to be an issue with the @types/js-schema types definitions module, I changed it's index.d.ts file and it now works ......
Read more >
Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError - Some selector is not a function - jQuery is not a function - owlCarousel...
Read more >
format.replace is not a function in randomToken function im ...
PageTriage extension causes TypeError: format.replace is not a function in randomToken function im SearchSatisfaction schema. Closed, ResolvedPublic. Actions.
Read more >
materialSelect is not a function - Material Design for Bootstrap
Uncaught TypeError: $(...).materialSelect is not a function. I am using $('.mdb-select').materialSelect(); I Got working with html but when I put the same ...
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