getting error in a file written in ES6
See original GitHub issueThe file is https://github.com/ritz078/react-filters/blob/canary/components/Slider/Slider.js
The error I get is
Error with path "./components/Slider/Slider.js": Error: [{type: ImportDefaultSpecifier, start: 370, end: 374, loc: [object Object], local: [object Object], id: null, name: null}] does not match type Printable
Error: [{type: ImportDefaultSpecifier, start: 370, end: 374, loc: [object Object], local: [object Object], id: null, name: null}] does not match type Printable
at Type.Tp.assert (/Users/ritz078/.npm-packages/lib/node_modules/react-docgen/node_modules/recast/node_modules/ast-types/lib/types.js:56:15)
at genericPrintNoParens (/Users/ritz078/.npm-packages/lib/node_modules/react-docgen/node_modules/recast/lib/printer.js:219:26)
at genericPrint (/Users/ritz078/.npm-packages/lib/node_modules/react-docgen/node_modules/recast/lib/printer.js:164:9)
at printRootGenerically (/Users/ritz078/.npm-packages/lib/node_modules/react-docgen/node_modules/recast/lib/printer.js:105:15)
at maybeReprint (/Users/ritz078/.npm-packages/lib/node_modules/react-docgen/node_modules/recast/lib/printer.js:97:16)
at print (/Users/ritz078/.npm-packages/lib/node_modules/react-docgen/node_modules/recast/lib/printer.js:75:29)
at exports.printComments (/Users/ritz078/.npm-packages/lib/node_modules/react-docgen/node_modules/recast/lib/comments.js:324:22)
at printWithComments (/Users/ritz078/.npm-packages/lib/node_modules/react-docgen/node_modules/recast/lib/printer.js:61:16)
at print (/Users/ritz078/.npm-packages/lib/node_modules/react-docgen/node_modules/recast/lib/printer.js:66:20)
at Printer.print (/Users/ritz078/.npm-packages/lib/node_modules/react-docgen/node_modules/recast/lib/printer.js:118:21)
The command I ran was react-docgen ./components/Slider/Slider.js
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
TypeScript ES6 import module "File is not a module error"
When I am trying to compile the main.ts file I get this error: Error TS2306: File 'test.ts' is not a module. How can...
Read more >Custom JavaScript Errors in ES6 - Jamund Ferguson
One of the common ways to handle this is to append errors with custom properties (which is used heavily in node.js itself.) var...
Read more >Error - JavaScript - MDN Web Docs - Mozilla
Runtime errors result in new Error objects being created and thrown. Error is a serializable object, so it can be cloned with structuredClone() ......
Read more >ES6 - Error Handling - Tutorialspoint
ES6 - Error Handling, There are three types of errors in programming: Syntax Errors, Runtime Errors, and Logical Errors.
Read more >rollup.js
You can provide an optional Rollup configuration file to simplify command line usage and enable advanced Rollup functionality.
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 Free
Top 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
Confirming imported defaults now work, very much appreciated @fkling.
Nice! Testing 😄