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.

Error `requireUncached is not defined`

See original GitHub issue

Issue Description

When switching a working example from require(...) to requireUncached(...) I get this error:

ReferenceError: requireUncached is not defined
    at Object.action (/Users/.../http/.httpyac.js:31:20)
    at be.trigger (/Users/.../http/node_modules/httpyac/dist/index.js:1:3409)
    at async ie (/Users/.../http/node_modules/httpyac/dist/index.js:1:14784)
    at async $e.trigger (/Users/.../http/node_modules/httpyac/dist/index.js:1:3392)
    at async we (/Users/.../http/node_modules/httpyac/dist/index.js:1:21944)
    at async Va (/Users/.../http/node_modules/httpyac/dist/index.js:115:19709)
    at async Qt (/Users/.../http/node_modules/httpyac/dist/index.js:115:19085)
    at async Object.Ja (/Users/.../http/node_modules/httpyac/dist/index.js:139:3468)
ExecuteHook: httpClient failed

Both on CLI and VS-Code plugin, node version v17.0.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

AnWebercommented, Dec 11, 2021

I think for the ticket there is nothing more to do currently. I will probably throw out requireUncached with the next major release.

AnWebercommented, Nov 28, 2021

requireUncached is not needed while using cli. The require cache is only in memory and does not survive a restart of the app. Does not fix the bug, but it should be not your initial problem. Try using Javascript Debugger Terminal in VSCode with the httpyac cli. You could debug the .httpyac.js and all requires code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js require() cache - possible to invalidate? - Stack Overflow
a.js is not yet fully loaded and exports.a is yet to be defined, so b.js get's nothing.
Read more >
How to fix "require is not defined" in JavaScript / Node.js?
Learn what is "require-is-not-defined" error in JavaScript, when they occur, and how you can fix it in both browser and Node.js environment.
Read more >
require-uncached - npm
require-uncached Build Status. Require a module bypassing the cache. Useful for testing purposes when you need to freshly require a module.
Read more >
Replace require-uncached with import-fresh #280 - GitHub
Looks like a straight forward switch from one module to the other. No idea why he renamed it. All reactions. Sorry, something went...
Read more >
How to fix the error `require is not defined` in Node.js
Today I started writing a new project on Node.js and got this error on the very first run: const express = require('express'); ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found