Skip to content

Dependency not found while installed #9963

@jdorel

Description

@jdorel

Version

2.6.10

Reproduction link

https://github.com/jdorel/vue-bug

Steps to reproduce

I am trying to import a module created using the openapi-generator tool for javascript.

  • Create an new project (vue create project) with the default configuration
  • Change directory to the project
  • Install my local dependency (npm install ../api/custom_api_javascript --save)
  • Call the dependency (var CustomApi = require('custom_api')) in src/components/HelloWorld.vue
  • Add webpack configuration according to module () in vue.config.js:
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
  • Run the development server (npm run serve)

PS: I also tried without the amd parser: false, but the result is the same.

What is expected?

The dependency is found

What is actually happening?

This dependency was not found:

* custom_api in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vuetify-loader/lib/loader.js!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/home.vue?vue&type=script&lang=js&

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions