Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found: Error: Can't resolve when using Gulp.js WebPack #9

Open
ralphjesy12 opened this issue Jan 12, 2017 · 2 comments
Open

Comments

@ralphjesy12
Copy link

I am using Gulp.js via Laravel Elixir and Webpack

{ [Error: ./~/vue-bulma-tabs/src/index.js
Module not found: Error: Can't resolve './Tabs' in '/App/node_modules/vue-bulma-tabs/src'
resolve './Tabs' in '/App/node_modules/vue-bulma-tabs/src'
  using description file: /App/node_modules/vue-bulma-tabs/package.json (relative path: ./src)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /App/node_modules/vue-bulma-tabs/package.json (relative path: ./src)
    using description file: /App/node_modules/vue-bulma-tabs/package.json (relative path: ./src/Tabs)
      as directory
@blackfyre
Copy link
Contributor

It should work, with ES6 imports & webpack...
Another option would be to use Laravel Mix instead of Elixir.

@Rkaede
Copy link

Rkaede commented Apr 17, 2017

This source for this component uses imports without specifying .vue in the filename:

From vue-bulma-tabs/src/index.js:

import Tabs from './Tabs' // should be './Tabs.vue'

To work around this you'll need to configure webpack to import .vue files without needing an extension. Adding the following to your webpack config should resolve the issue:

resolve: {
    extensions: ['*', '.js', '.vue'],
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants