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.

Cannot use require with v20.0.0

See original GitHub issue

Using require with v20.0.0 does not work, but using v17.1.0 does. We confirmed this on two separate machines and devs.

We created a simple js script that requires v20.0.0. We then just use node to execute that script.

javascript var google = require('googleapis'); We then get the error message, Error: Cannot find module ‘googleapis’.

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

11reactions
etnbrdcommented, Jun 28, 2017

The problem is due to the googleapi.ts not being compiled to googleapi.js. To fix this, the maintainer should include the compiled version in the package.

However, it seems to work when I compile it myself :

cd node_modules/googleapis
npm install -g typescript
tsc # or npm run build
# There will be error messages, though it works anyway.
5reactions
jmdobrycommented, Jun 29, 2017

This was my mistake (don’t publish packages while on vacation). I just published googleapis@20.0.1 which should include the built .js files.

Read more comments on GitHub >

github_iconTop Results From Across the Web

require module inside preload script in electron - Stack Overflow
What version of Electron are you using? I'm having the same issue requiring my own module in the preloader. It worked fine back...
Read more >
Installing IBM Business Automation Workflow Version 20.0.0.2
This document provides instructions for installing IBM Business Automation Workflow Version 20.0.0.2 to upgrade IBM Business Process Manager ...
Read more >
SAFE v20.0.0 Release Notes - Computers and Structures, Inc.
Documentation for how to use the API is provided in the help file "CSI. API SAFE v1.chm". Documentation for the data available in...
Read more >
Electron 20.0.0
Electron 20.0.0 has been released! It includes upgrades to Chromium 104, V8 10.4, and Node.js 16.15.0. Read below for more details!
Read more >
1.2. DisplayPort Intel® FPGA IP v20.0.0
Intel technologies may require enabled hardware, software or service activation. // No product or component can be absolutely secure.
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