Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Cannot find module 'vue-template-compiler' #245

Closed
hosein2398 opened this issue Nov 17, 2018 · 5 comments
Closed

Cannot find module 'vue-template-compiler' #245

hosein2398 opened this issue Nov 17, 2018 · 5 comments

Comments

@hosein2398
Copy link

Expected behavior

Create sound output

Actual behavior

Throwing error

I was trying out minimal example that i faced this :

[!] Error: Cannot find module 'vue-template-compiler'
Error: Cannot find module 'vue-template-compiler'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/hosein/Documents/testing pa...

Installing vue-template-compiler manually solved it.

Depenedecies:

"rollup": "^0.67.3",
"rollup-plugin-vue": "^4.3.2",

rollup config:

import vue from 'rollup-plugin-vue'

export default {
  input: './comp.vue',
  output: {
    format: 'esm',
    file: 'dist/MyComponent.js'
  },
  plugins: [
    vue()
  ]
}
@nmxiaowei
Copy link

npm install vue-template-compiler --save-dev

@hosein2398
Copy link
Author

I guess everyone knows that it would work that way, this was opened cause i wonder why it's not installed by default.

@Justineo
Copy link
Member

Justineo commented Dec 2, 2018

vue-template-compiler is listed in peerDependencies so it is expected. You should had seen a warning when you install rollup-plugin-vue without vue-template-compiler.

@nmxiaowei
Copy link

it is bug @hosein2398

@hosein2398
Copy link
Author

This is not a bug peerDependencies should be installed by user.
But this should have been said in docs.

@znck znck closed this as completed in 08229a0 Jan 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants