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.

Release v4.0.5 needs ES6 modules syntax?

See original GitHub issue

During 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:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
keithamuscommented, Nov 9, 2017

BTW I have unpublished 4.0.4 (the irony of which is not lost on me)

npm i type-detect@4.0.4                                                                                                                                                                 
npm ERR! code ETARGET
npm ERR! notarget No matching version found for type-detect@4.0.4
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
1reaction
keithamuscommented, Nov 9, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

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