instantsearch: Missing vue-server-renderer/basic module on build

Bug 🐞

What is the current behavior?

Currently after building my app, the vue cli shows the following error:

warning  in ./node_modules/vue-instantsearch/dist/vue-instantsearch.esm.js

Module not found: Error: Can't resolve 'vue-server-renderer/basic' in 'C:\code\classpass\app\node_modules\vue-instantsearch\dist'

Does this happen only in specific situations? And What is the version you are using?

This only happened right after I upgraded dependencies for algolia related items:

  • algoliasearch
    • from 4.2.0 to 4.3.0
  • vue-instantsearch
    • from 2.7.0 to 3.1.0

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 5
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Hi, sorry to hijack this conversation but i think this could be helpful: The easiest way to solve this is by using webpack externals in your projects:

externals: {
    'vue-server-renderer/basic': 'vue-server-renderer/basic'
}

In a Laravel Mix configuration file you can do so like this:

mix.webpackConfig({
        externals: {
            'vue-server-renderer/basic': 'vue-server-renderer/basic'
        }
})

I’m seeing a similar issue with the same vue-server-renderer/basic, but it’s only a warning, not an error:

warning  in ./node_modules/vue-instantsearch/dist/vue-instantsearch.esm.js

Module not found: Error: Can't resolve 'vue-server-renderer/basic' in '/Users/saltymouse/webdev/my-app/node_modules/vue-instantsearch/dist'

The resulting app bundle still seems to work, but it’s just showing this warning.

I’ve setup a minimal repo with Laravel Mix (same as my production setup) if this helps: https://github.com/saltymouse/algolia-vue-instantsearch-module-warning

Yup, just ran into this issue myself;

the workaround does not work though,

 WARNING  Compiled with 1 warnings                                                                                                                                          10:10:24 PM

Module build failed: Module not found:
./node_modules/vue-instantsearch/dist/vue-instantsearch.esm.js contains a reference to the file vue-server-renderer/basic.
This file can not be found, please check it for typos or update it if the file got moved.

Adding the unused library fixes the issue:

yarn add @vue/server-renderer

Also having the same issue with webpack and could not solve it with npm install vue-server-renderer/basic --save as this triggers a permission denied issue, so I had to install the whole package npm install vue-server-renderer --save

@Kocal apologies - I thought you had all the information you needed above.

I’ve solved this by doing a npm install vue-server-renderer/basic --save but as someone said that installs a dependency I don’t need.

Happy to give you all the details you need to debug this. Can you let me know what would help?