Cannot find module 'vue-template-compiler' from 'vue-test-utils.js'
See original GitHub issueVersion
1.0.0-beta.30
Reproduction link
https://github.com/wemake-services/wemake-vue-template
Steps to reproduce
- Create new project using this boilerplate
- Install dependencies
- Run
npm test
What is expected?
I expect everything to work as it was before the -beta.30
What is actually happening?
Link to the failing CI: https://travis-ci.com/wemake-services/wemake-vue-template/builds/143178639 Now I have an exception:
> cross-env NODE_ENV=test jest
FAIL tests/components/action-bar.spec.ts
● Test suite failed to run
Cannot find module 'vue-template-compiler' from 'vue-test-utils.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
at Object.<anonymous> (node_modules/@vue/test-utils/dist/vue-test-utils.js:5:27)
FAIL tests/components/comment.spec.ts
● Test suite failed to run
Cannot find module 'vue-template-compiler' from 'vue-test-utils.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
at Object.<anonymous> (node_modules/@vue/test-utils/dist/vue-test-utils.js:5:27)
FAIL tests/pages/index.spec.ts
● Test suite failed to run
Cannot find module 'vue-template-compiler' from 'vue-test-utils.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
at Object.<anonymous> (node_modules/@vue/test-utils/dist/vue-test-utils.js:5:27)
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
Test Suites: 3 failed, 3 total
Tests: 0 total
Snapshots: 0 total
Time: 9.111s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! name@0.0.0 test:unit: `cross-env NODE_ENV=test jest`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the name@0.0.0 test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sobolev/.npm/_logs/2020-01-09T13_49_48_645Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! name@0.0.0 test: `npm run test:engine && npm run test:unit && npm run lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the name@0.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sobolev/.npm/_logs/2020-01-09T13_49_48_684Z-debug.log
> cross-env NODE_ENV=test jest
FAIL tests/components/action-bar.spec.ts
● Test suite failed to run
Cannot find module 'vue-template-compiler' from 'vue-test-utils.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
at Object.<anonymous> (node_modules/@vue/test-utils/dist/vue-test-utils.js:5:27)
FAIL tests/components/comment.spec.ts
● Test suite failed to run
Cannot find module 'vue-template-compiler' from 'vue-test-utils.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
at Object.<anonymous> (node_modules/@vue/test-utils/dist/vue-test-utils.js:5:27)
FAIL tests/pages/index.spec.ts
● Test suite failed to run
Cannot find module 'vue-template-compiler' from 'vue-test-utils.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
at Object.<anonymous> (node_modules/@vue/test-utils/dist/vue-test-utils.js:5:27)
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
Test Suites: 3 failed, 3 total
Tests: 0 total
Snapshots: 0 total
Time: 9.111s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! name@0.0.0 test:unit: `cross-env NODE_ENV=test jest`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the name@0.0.0 test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sobolev/.npm/_logs/2020-01-09T13_49_48_645Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! name@0.0.0 test: `npm run test:engine && npm run test:unit && npm run lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the name@0.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sobolev/.npm/_logs/2020-01-09T13_49_48_684Z-debug.log
- Jest config: https://github.com/wemake-services/wemake-vue-template/blob/master/template/jest.config.js
- package.json: https://github.com/wemake-services/wemake-vue-template/blob/master/template/package.json
- Actual tests: https://github.com/wemake-services/wemake-vue-template/tree/master/template/tests
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Test suite failed to run Cannot find module 'vue-template ...
If I do install that vue-template-compiler package I get the error of version mismatching. Anyone that found a solution to this problem yet...
Read more >Cannot find module '@vue/compiler-sfc/package.json'
When upgrading to vue 3 with : yarn add vue@next. I get this error: “Cannot find module '@vue/compiler-sfc/package.json”
Read more >cannot find module '@vue/compiler-dom' from 'node_modules ...
Subject of the issue. im using nuxt to the project first i using test utils version 1.1.2 it work fine for testing vuex...
Read more >Fatal Error: Cannot find module 'vue/package.json' - Issuehunt
This is when the error "FATAL Cannot find module 'vue/package.json'" shows up. ... run Cannot find module 'vue-template-compiler' from 'vue-test-utils.js' ...
Read more >vue-template-compiler - npm
For pull requests please see src/platforms/web/entry-compiler.js. This package can be used to pre-compile Vue 2.0 templates into render ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It was related to
10
->12
node migration process: https://github.com/wemake-services/wemake-vue-template/compare/aedfddb452bf...1165ffb99cb8Thanks!
Why vue-template-compiler listed in peer dependencies? I’m using vue components without .vue files (templates as strings in js) and I don’t need in vue-template-compiler functionality for my project.