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.

Cannot build esbuild bundle

See original GitHub issue

Describe the bug It appears the path used in

<script data-entry-point type="module" src="./App.js"></script>

Needs to exist on disk for esbuild to find it.

To Reproduce

I have a config like this:

{
  "$schema": "https://raw.githubusercontent.com/AngelMunoz/Perla/v0.22.1/perla.schema.json",
  "index": "./index.html",
  "fable": {
    "project": "./src/MyProject.App/MyProject.App.fsproj",
    "extension": ".js",
    "outDir": "./out"
  },
  "devServer": {
    "port": 8900,
    "mountDirectories": {
      "./out": "",
      "./out/fable_modules": "/fable_modules",
      "./images": "/images"
    },
    "useSSL": true,
    "watchConfig": {
        "directories": [ "./out", "./images" ]
    },
    "liveReload": true
  }
}

I’m mounting the physical out folder on the root and then i"m pointing my src="./App.js" of my data-entry-point to it.

Expected behaviour It would be nice if there was some validation of whether the file passed to esbuild exists. If it doesn’t, it could look into the physical folder (out in my case) that is mapped to the root of the dev server.

Desktop (please complete the following information):

  • OS: Windows

Additional context Add any other context about the problem here.

Mounting "./out": "", doesn’t appear to include any subfolders. This might be a different bug or expected behaviour, I’m not sure.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nojafcommented, Aug 22, 2022

What version are you on?

I’m on 0.22.1

Thanks for the quick response.

0reactions
AngelMunozcommented, Aug 26, 2022

The new version has been released! Once again thanks for this contribution

https://www.nuget.org/packages/Perla/0.23.0 https://github.com/AngelMunoz/Perla/releases/tag/v0.23.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

esbuild bundle incorrectly · Issue #1488
From the discussion above and the linked issues, it sounds like the problem is the Yarn PnP plugin causes the package's main field...
Read more >
AWS SAM - Esbuild Failed: cannot find esbuild
I was encountering this issue as well. I put sam build as an npm script so that it looks at your project's node_modules...
Read more >
Getting Started
First, install the react and react-dom packages: npm install react react-dom. Then create a file called app.jsx containing the following code:
Read more >
Serverless Esbuild
serverless-esbuild. Serverless plugin for zero-config JavaScript and TypeScript code bundling using promising fast & furious esbuild bundler and minifier.
Read more >
@nx/esbuild:esbuild | Nx
Bundle a package for different platforms. Note: declaration (*.d.ts) file are not currently generated. Options can be configured in project.json when defining ...
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