Release v4.0.5 needs ES6 modules syntax?
See original GitHub issueDuring my build I’m getting:
/usr/src/app/node_modules/type-detect/index.js:49
export default function typeDetect(obj) {
^^^^^^
SyntaxError: Unexpected token export
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
It’s intentional? Because it seems like huge change, not a minor patch – v4.0.3
used old module syntax.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:19 (11 by maintainers)
Top Results From Across the Web
Importing defaults with es6 syntax doesn't work #5565 - GitHub
Syntax : import name from "module-name"; doesnt work in my project with Typescript 1.6. The imported variable is undefined.
Read more >ECMAScript modules | Node.js v19.3.0 Documentation
Builtin modules# Core modules provide named exports of their public API. A default export is also provided which is the value of the...
Read more >JavaScript Modules - Discover three.js!
ES6 Module Syntax: import and export # · Import and export Statements can be Placed Anywhere in Module Scope# · Relative Import URLs#...
Read more >Import To Require Syntax - Visual Studio Marketplace
Convert ES6 module import syntax to ES5 require syntax. Installation. Launch VS Code Quick Open ( Ctrl+P ), paste the following command, ...
Read more >Documentation - TypeScript 4.7
TypeScript 4.7 Release Notes. ... For example, Node.js requires module entry-points to be written in a .mjs , or have a nearby package.json...
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
BTW I have unpublished
4.0.4
(the irony of which is not lost on me)I’m going to close this issue; I’m pretty sure we’ve resolved this. If anyone else has any issues please feel free to comment (or raise a new issue) and we can look into it.