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.

Build error: Could not resolve "grid-engine/dist/Direction/Direction"

See original GitHub issue

Howdy! I was working on getting all the proper typing passed to various functions, and while I was working on the movement code I tried to use the Direction enum as the parameters for movement. However, when trying to build I got the following error…

> .\node_modules\.bin\esbuild src/Game.ts --bundle --outfile=public/game.js

 > src/scenes/MainScene.ts:2:26: error: Could not resolve "grid-engine/dist/Direction/Direction" (mark it as external to exclude it from the bundle)
    2 │ import { Direction } from "grid-engine/dist/Direction/Direction";
      ╵                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error

However, I’m 100% certain that the Direction.d.ts file is precisely where it should be - it was suggested and autofilled by the editor, after all.

Is this an issue you’ve come across? Is there a fix?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
splashskycommented, Jun 24, 2021

Are you using version 2.4.0?

This appears to have been the issue. As of updating to 2.4.0 I no longer have that notice. Thanks, Anno! 😄

1reaction
Annoraaqcommented, Jun 24, 2021

Are you using version 2.4.0?

Read more comments on GitHub >

github_iconTop Results From Across the Web

MSBuild error: "Could not resolve this reference. Could not ...
I was able to build my current solution successfully earlier this morning, but the build suddenly started failing ~15 minutes ago, with the ......
Read more >
Cannot build image due to domain resolving issue #4990
Background When trying to build the image on Docker build, the domain github.com is not resolved and I obtain an error.
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