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.

"export 'FlatCompassDirection' was not found in 'honeycomb-grid'

See original GitHub issue

Hi,

I’m using this (very useful) library with typescript and webpack and run into this warning

"export 'FlatCompassDirection' was not found in 'honeycomb-grid'

for this code

import { Hex, Point, FlatCompassDirection } from 'honeycomb-grid';
...
const neighbors = grid.neighborsOf(hex, [
        FlatCompassDirection.SE, FlatCompassDirection.S, FlatCompassDirection.SW,
        FlatCompassDirection.NW, FlatCompassDirection.N, FlatCompassDirection.NE,
]);

It results in this error at runtime:

TypeError: honeycomb_grid__WEBPACK_IMPORTED_MODULE_14__.FlatCompassDirection is undefined

It looks a lot like this webpack issue, that seem to indicate you can fix the issue by changing the way it is declared.

Many answers on stackoverflow seem to imply it could also work by declaring the enum as ‘const’ in the types declaration file.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
flauwekeulcommented, May 2, 2020

You can change those files, but they’ll be overridden when you run npm install (and there’s a change in the file).

Anyway, great! I’ll publish a new version later today.

0reactions
flauwekeulcommented, May 2, 2020

Fixed in 3.1.7

Please let me know if you have any more questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Usage questions · Issue #2 · flauwekeul/honeycomb - GitHub
When I use Grid factory to create a rectange grid, like this: var Grid = HC.Grid({ size: 24, orientation: HC.HEX_ORIENTATIONS.POINTY }); var grid...
Read more >
Manual - Comprehensive guide to making the most of Deesha ...
To do this, with the device flat align the top of the device towards the location to project to and press the 'Bearing...
Read more >
Simile documentation and help - Simulistics
The event occurs when the value of the equation reaches the minimum or maximum, and the event should cause the value to go...
Read more >
WUFI2D 3.2 Example by Jean-Yves Mesnil - Issuu
WUFI 2D automatically generates a numerical grid, subdividing the component into small grid ... The compass direction towards which the surface is facing....
Read more >
DDMT instruction manual - Wildbyte Technologies
Gridlines (for acceleration, geomagnetism, and metrics) ... Setting the DD orientation and exporting magnetic heading. 68. Pitch and Roll.
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