Skip to content

Cannot find module, but module is installed #10

@gkpo

Description

@gkpo

Trying to import axios from node_modules. Here's my code:

{% compress js %}

<script type="module">
  import axios from 'axios'
</script>

{% endcompress %}

I get the following error:

Error: Cannot find module 'axios' from '/private/var/folders/3c/j8344gl91f73mh3w4dsl0ylm0000gn/T'
    at /path-to-my-project/node_modules/browser-resolve/node_modules/resolve/lib/async.js:46:17

It looks like the package is not looking inside the node_modules directory, but some kind of temp dir...?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions