Skip to content

generate import map npx payload generate:importmap giving an error #9861

Discussion options

You must be logged in to vote

For anyone else running into this, double check the path to your custom component. It should be a string path that points to where your custom component is. If it's a named export, you should use a # followed by the variable name of the component. (IE: '/components/MyComp#MyComp').

If you're getting a message in your logs that reads something along the lines of "importMap couldn't find the component," then it's most likely an issue with your path.

If you're getting a cryptic error message about file extensions, then I'd double check that you're not passing an actual React component to the path, and instead you should be passing a string path to it.

See more on component paths.

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@aaronksaunders
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hassanbhatti1989
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants