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.

ReferenceError: file is not defined

See original GitHub issue

I’m getting the below reference error when building my project using styleguidist. It looks like the console logging that occurs in the catch block of props.loader.js is referencing a file variable that is declared in a different block. This could probably be fixed by initializing file as a var outside the try block scope.

Module build failed: ReferenceError: file is not defined
    at Object.module.exports (<snip>/node_modules/react-styleguidist/loaders/props.loader.js:40:66)
❯ node -v
v6.5.0
❯ npm -v
3.10.7
❯ cat package.json | grep version
  "version": "3.1.1"

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
ahutchingscommented, Sep 14, 2016

Ah, I see that this was fixed in #173, but it has not been released to npm yet. Could we publish a new version to npm?

0reactions
sapegincommented, Oct 6, 2016

4.0.0 is out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

"File is not defined" error in javascript while executing from ...
It is because the variable File is not defined. So you are trying to do new File(txtFile) but there is nothing that defines...
Read more >
ReferenceError: file is not defined - JavaScript - SitePoint
Hi, Following is my code, var assert = require('assert'); const path = require("path"); const fs = require("fs"); ...
Read more >
ReferenceError: file is not defined : r/learnjavascript - Reddit
Hi, Following is my code, var assert = require('assert'); const path = require("path"); const fs = require("fs"); //const F5 =…
Read more >
FilePicker.js: "File is not defined" after selecting file to upload
It is reproducible on this and at least one other site with a file upload field. ... This no longer works. Expected results:...
Read more >
ReferenceError: require is not defined in JavaScript - Stack Diary
The "ReferenceError: require is not defined" error occurs when the require function is used in a JavaScript file that is intended to be ......
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