0

I have a project created in Vue.js, this project is actually managed by tfs with git.

First of all, I want to change the project name so I do steps:

  1. Create a new folder (directory) with my new project name.
  2. I copy all the folders and files from my old project to my new directory.
  3. I open package.json file and replace the name property with my new project name.
  4. I opened the project in Visual Code and run in terminal command: yarn
  5. Once it finishes I run the command: yarn run serve

But I got an error :

Failed to compile with 1 errors

Module build failed (from ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js):

Error: No ESLint configuration found. at Config.getLocalConfigHierarchy (/Users/MyUser/projectname/node_modules/eslint/lib/config.j s:268:39)

So I have some questions:

What should I do to solve this error? I'm doing the wrong way?

How can I remove existing git relation of tfs to specify a new one?

Phil
  • 157,677
  • 23
  • 242
  • 245
Leon
  • 13
  • 4
  • try to remove `node_modules` folder and `yarn` again? – bcjohn Jul 23 '19 at 05:17
  • Sounds like you want to _fork_ the existing git project (aka clone and change the remote `origin` to a new value). If so, see the excellent answers in this post ~ [Are Git forks actually Git clones?](https://stackoverflow.com/questions/6286571/are-git-forks-actually-git-clones) – Phil Jul 23 '19 at 05:37
  • Yes I try it and same error. Now I have another additional error Error: No ESLint configuration found. @bcjohn – Leon Jul 23 '19 at 05:45
  • But its weird because in my original project I don't have this issue with ESLint, why in this replica I have it? @bcjohn – Leon Jul 23 '19 at 05:53
  • When you copied the project, you probably missed the dot-files (eg `.eslintrc.js`). Again, do it properly by cloning the project from source control – Phil Jul 23 '19 at 06:02
  • And how can I change tfs repository? I mean remove existing connection with git and create new one @Phil – Leon Jul 23 '19 at 06:09

1 Answers1

0

I'd say the issue is that you have missed some files when copying the project, namely any dot-files (eg .eslintrc.js).

What you want to do is fork the original project. This can be done by cloning it then changing the origin remote to point to your new repository.

git clone <url-or-path-to-original-project> my-new-project
cd my-new-project
git remote set-url origin <url-of-new-repository>

Now edit your package.json then commit and push the changes.

git commit -am 'Forked to <new-project-name>'
git push -u origin master

See https://help.github.com/en/articles/changing-a-remotes-url

Phil
  • 157,677
  • 23
  • 242
  • 245