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.

Bug: Build artifact at Beta 6 is different from `npm run build`

See original GitHub issue
// `npm run build` output dist/index.cjs

'use strict';

exports = module.exports = fetch;

function fetch(url, options_) { 
// ...
}

vs

// published 3.0.beta-6 dist/index.cjs
'use strict';

exports = module.exports = fetch;

const fetch = (url, options_) => {
// ..
}
//

Not sure if there is an extra pre-publishing step performed, but as a result beta.6 is completely broken.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
tinovyatkincommented, May 25, 2020

@xxczaki the issue wasn’t related to Rollup - it can export as an arrow function. The problem was that by changing from a function to const you break the hoisting, so, fetch becomes undefined on top of the file.

1reaction
tinovyatkincommented, May 25, 2020

That was a huge PR, changing across 12 files and merged after just one approval - we should set policy on that…

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Preinstall script runs after installing dependencies #2660
Current Behavior: In NPM v7 the preinstall script runs after dependencies are installed, which breaks backwards compatibility with NPM v6.
Read more >
Code build is failed with Error while executing command: npm ...
I assigned the administration access temporarily and it worked but failed due to different reason. To check it, try to execute the simple...
Read more >
How to Automate NPM Package Publishing With Azure ...
Step 1: Authorize Azure Pipelines. Link to this section · Step 2: Build pipeline · Step 3: Release pipeline · Step 4: Publish...
Read more >
Postinstall-build - npm.io
This example is missing a build artifact – or rather, npm run build is mistakenly being passed as the build artifact. Since that...
Read more >
npm-publish - npm Docs
This can be overridden by specifying a different default registry or using a scope ... [--dry-run] : As of npm@6 , does everything...
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