Cannot use require with v20.0.0
See original GitHub issueUsing 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:
- Created 6 years ago
- Reactions:6
- Comments:10 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem is due to the
googleapi.ts
not being compiled togoogleapi.js
. To fix this, the maintainer should include the compiled version in the package.However, it seems to work when I compile it myself :
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.