Skip to content

Commit

Permalink
fix(ts): add compiled assets to javascript directory so it's bundled …
Browse files Browse the repository at this point in the history
…by bob (#2442)
  • Loading branch information
mfazekas authored Nov 22, 2022
1 parent 835ea74 commit f6ab499
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 1 deletion.
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion javascript/components/HeadingIndicator.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import headingIcon from '../../assets/heading.png';
import headingIcon from '../assets/heading.png';

import { SymbolLayer } from './SymbolLayer';

Expand Down

1 comment on commit f6ab499

@frenzzz
Copy link

@frenzzz frenzzz commented on f6ab499 Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, there is an error compiling

error: Error: Unable to resolve module ../../assets/heading.png from src\node_modules\@rnmapbo\maps\javascript\components\HeadingIndicator.tsx:

None of these files exist:
  * heading.png
  * node_modules\@rnmapbox\maps\assets\heading.png\index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)

> 1 | import React from 'react';
  2 |
  3 | import headingIcon from '../assets/heading.png';
  4 |
    at ModuleResolver.resolveDependency (src\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:107:15)
    at DependencyGraph.resolveDependency (src\node_modules\metro\src\node-haste\DependencyGraph.js:288:43)
    at Object.resolve (src\node_modules\metro\src\lib\transformHelpers.js:129:24)
    at resolve (src\node_modules\metro\src\DeltaBundler\traverseDependencies.js:396:33)
    at src\node_modules\metro\src\DeltaBundler\traverseDependencies.js:412:26
    at Array.reduce (<anonymous>)
    at resolveDependencies (src\node_modules\metro\src\DeltaBundler\traverseDependencies.js:411:33)
    at processModule (src\node_modules\metro\src\DeltaBundler\traverseDependencies.js:140:31)
    at async addDependency (src\node_modules\metro\src\DeltaBundler\traverseDependencies.js:230:18)
    at async Promise.all (index 15)

Please sign in to comment.