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

VUE/cli3.0创建项目报错 #3142

Closed
yudan215 opened this issue Dec 17, 2018 · 0 comments · Fixed by #3212
Closed

VUE/cli3.0创建项目报错 #3142

yudan215 opened this issue Dec 17, 2018 · 0 comments · Fixed by #3212

Comments

@yudan215
Copy link

Version

3.2.1

Reproduction link

Environment info

Environment Info:

  System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
  Binaries:
    Node: Not Found
    Yarn: 1.5.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.1.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 42.17134.1.0
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

使用vue-cli创建项目·选择使用typescript和单元测试Mocha chai出现安装出错问题

试过npm uninstall typescript
然后npm i typescript@3.1.1 -g还是不行

What is expected?

成功安装

What is actually happening?

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: ~3.1.1

YOUR TYPESCRIPT VERSION: 3.2.2

Please only submit bug reports when using the officially supported version.

=============
error: 'chai' should be listed in the project's dependencies, not devDependencies (import/NO-extraneous-dependencies) at vue-typescript\tests\unit\example.spec.ts:1:1: > 1 | import { expect } from 'chai';
| ^
2 | import { shallowMount } from '@vue/test-utils';
3 | import HelloWorld from '@/components/HelloWorld.vue';
4 |

error: '@vue/test-utils' should be listed in the project's dependencies, not devDependencies (import/NO-extraneous-dependencies) at vue-typescript\tests\unit\example.spec.ts:2:1:
1 | import { expect } from 'chai';

2 | import { shallowMount } from '@vue/test-utils';
| ^
3 | import HelloWorld from '@/components/HelloWorld.vue';
4 |
5 | describe('HelloWorld.vue', () => {

2 errors found.
Error: Process exited with code 1
at exports.exit (C:\vue\vue-typescript\node_modules@vue\cli-shared-utils\lib\exit.js:7:11)
at lint (C:\vue\vue-typescript\node_modules@vue\cli-plugin-eslint\lint.js:88:5)
at api.onCreateComplete (C:\vue\vue-typescript\node_modules@vue\cli-plugin-eslint\generator\index.js:106:25)
at Creator.create (C:\Users\211\AppData\Roaming\npm\node_modules@vue\cli\lib\Creator.js:182:13)
at process._tickCallback (internal/process/next_tick.js:68:7)

haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this issue Dec 29, 2018
haoqunjiang added a commit that referenced this issue Dec 30, 2018
…3212)

* fix: fix eslint cwd confusion during onCreateComplete hook execution

fixes #2554
fixes #3142

* fix: do not mock process.cwd during invoking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant