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

Bug on install - delete src directory #2

Open
Jeremy-F opened this issue Jan 16, 2019 · 8 comments
Open

Bug on install - delete src directory #2

Jeremy-F opened this issue Jan 16, 2019 · 8 comments
Labels
bug Something isn't working

Comments

@Jeremy-F
Copy link

Jeremy-F commented Jan 16, 2019

Versions :

  • Yarn 1.13.0
  • NPM 6.5.0
  • Vue-cli 3.1.1

Result of : vue add template-loader

📦  Installing vue-cli-plugin-template-loader...

+ [email protected]
updated 1 package and audited 15260 packages in 10.81s
found 0 vulnerabilities

✔  Successfully installed plugin: vue-cli-plugin-template-loader


🚀  Invoking generator for vue-cli-plugin-template-loader...
 ERROR  Error: Cannot find module '@vue/cli-plugin-typescript/generator/template/src/shims.d.ts' from '/private/tmp/test/node_modules/vue-cli-plugin-template-loader/generator/template/src'
Error: Cannot find module '@vue/cli-plugin-typescript/generator/template/src/shims.d.ts' from '/private/tmp/test/node_modules/vue-cli-plugin-template-loader/generator/template/src'
    at Function.module.exports [as sync] (/Users/ME?/.config/yarn/global/node_modules/resolve/lib/sync.js:43:15)
    at renderFile (/Users/ME?/.config/yarn/global/node_modules/@vue/cli/lib/GeneratorAPI.js:322:17)
    at _injectFileMiddleware (/Users/ME?/.config/yarn/global/node_modules/@vue/cli/lib/GeneratorAPI.js:184:27)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)

And all my src directory has been deleted.

@elevatebart
Copy link
Owner

Ouch !! Yes, I entirely forget to update this plugin after the release of vue cli 3.1. I really think I should act on it soon.
Can you give me until Saturday that I look into it. Sorry about your src folder, I hope it’s not too bad.

@Jeremy-F
Copy link
Author

Don't worry, I solved the problem doing all the configuration manually.
(Updating the vue.config.js, and adding a html.d.ts into my project, already using vue-template-loader).

My last commit solved the problem about my src folder, thanks 👍

@m4ss1m0g
Copy link

The bug is still unsolved, warning Installing this version erase the src folder

@elevatebart
Copy link
Owner

Hello @m4ss1mog,

I would like to try and fix this bug asap.
Would you mind setting up a repo where it is failing?

Thank you in advance

@elevatebart elevatebart added the bug Something isn't working label Jan 28, 2020
@m4ss1m0g
Copy link

System

  • Vue Cli 4.1.2
  • Yarn 1.21.1
  • Windows 10

Repro step

  1. vue create -d -n repro
  2. cd repro\src
  3. touch newcomponent.vue
  4. cd .. Launch the next command on root directory
  5. vue add template-loader

Output

� Invoking generator for vue-cli-plugin-template-loader...
ERROR Error: Cannot find module '@vue/cli-plugin-typescript/generator/template/src/shims.d.ts' from 'D:\temp\repro\node_modules\vue-cli-plugin-template-loader\generator\template\src'
Error: Cannot find module '@vue/cli-plugin-typescript/generator/template/src/shims.d.ts' from 'D:\temp\repro\node_modules\vue-cli-plugin-template-loader\generator\template\src'
at Function.resolveSync [as sync] (C:\Users\massimo\AppData\Roaming\npm\node_modules@vue\cli\node_modules\resolve\lib\sync.js:81:15)
at renderFile (C:\Users\massimo\AppData\Roaming\npm\node_modules@vue\cli\lib\GeneratorAPI.js:440:17)
at _injectFileMiddleware (C:\Users\massimo\AppData\Roaming\npm\node_modules@vue\cli\lib\GeneratorAPI.js:246:27)
at process._tickCallback (internal/process/next_tick.js:68:7)

Result

The src folder is erased

@elevatebart
Copy link
Owner

I should probably check that vue/cli-plugin-typescript is already installed before I start invoking the plugin.
That is a big bug indeed.

Regarding the empty src folder, what would you expect an empty newcomponent.vue to transform into?
What should I put in the resulting js, css and html files?

@m4ss1m0g
Copy link

Regarding the empty src folder, what would you expect an empty newcomponent.vue to transform into?
What should I put in the resulting js, css and html files?

In this case is only a placeholder to show you that installing the plugin delete the src folder, nothing more.

@elevatebart elevatebart pinned this issue Feb 3, 2020
@elevatebart
Copy link
Owner

This issue should be fixed in v1.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants