Vue-test-utils: [1.0.0-beta.10] install failed.

Created on 11 Jan 2018  路  4Comments  路  Source: vuejs/vue-test-utils

env:

  • node: v9.3.0
  • system: macOS 10.12.4

How to reappear:

npm install

or

yarn install

expect:

Install successfully

result:

Throw error:

Error: Cannot find module '/path/to/project/node_modules/vue-test-utils/build/moved-warning'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:618:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node build/moved-warning`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.

Most helpful comment

Note that I needed to use import { mount } from '@vue/test-utils' instead if I used @vue/test-utils. It seems it is not documented yet here https://vue-test-utils.vuejs.org/en/guides/getting-started.html

All 4 comments

Sorry about that. I've released a fixed version beta.11.

Note that vue-test-utils has been moved to @vue/test-utils:

npm install --save-dev @vue/test-utils

@eddyerburgh Thanks!

Note that I needed to use import { mount } from '@vue/test-utils' instead if I used @vue/test-utils. It seems it is not documented yet here https://vue-test-utils.vuejs.org/en/guides/getting-started.html

Thanks, I'm updating the docs now

Was this page helpful?
0 / 5 - 0 ratings