์๋ ํ์ธ์!
๋ฒ๊ทธ ์ ๊ณ
๋ค์ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
[at-loader] ./node_modules/protractor/built/index.d.ts:5:10 ์ค๋ฅ
TS2440: ๊ฐ์ ธ์ค๊ธฐ ์ ์ธ์ด 'PluginConfig'์ ๋ก์ปฌ ์ ์ธ๊ณผ ์ถฉ๋ํฉ๋๋ค.
[at-loader] ./node_modules/protractor/built/index.d.ts:5:24 ์ค๋ฅ
TS2440: ๊ฐ์ ธ์ค๊ธฐ ์ ์ธ์ด 'ProtractorPlugin'์ ๋ก์ปฌ ์ ์ธ๊ณผ ์ถฉ๋ํฉ๋๋ค.
10.5.0
~5.1.2
^4.2.4
any
Windows 10
const { ์คํ ๋ฆฌํฌํฐ } = require('jasmine-spec-reporter');
export.config = {
allScriptsTimeout: 11000,
์ฌ์: [
'./e2e/ */ .e2e-spec.ts'
],
๋ฅ๋ ฅ: {
'๋ธ๋ผ์ฐ์ ์ด๋ฆ': 'ํฌ๋กฌ'
},
์ง์ ์ฐ๊ฒฐ: ์ฌ์ค,
baseUrl: ' http://localhost :4200/',
ํ๋ ์์ํฌ: '์ฌ์ค๋ฏผ',
jasmineNodeOpts: {
showColors: ์ฌ์ค,
๊ธฐ๋ณธ ์๊ฐ ์ด๊ณผ ๊ฐ๊ฒฉ: 30000,
์ธ์: ํจ์() {}
},
์ค๋น() {
require('๋
ธ๋').register({
ํ๋ก์ ํธ: 'e2e/tsconfig.e2e.json'
});
jasmine.getEnv().addReporter(new SpecReporter({ ์ฌ์: { displayStacktrace: true } }));
}
};
๊ธฐ๋ฅ ์์ฒญ
ํด๊ฒฐํ ์ ์๋๋ก ๋์์ฃผ์ธ์
์ค๋๋ถํฐ ๋์ผํ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค(Protractor 5.4.2 ๋ฐ Angular 8 ์ฌ์ฉ)
๊ฐ๋๊ธฐ 5.4.2 ๋ฐ Angular 8๊ณผ ๋์ผํ ๋ฌธ์
์ค๋ Typescript ๋ฒ์ ์ ์ ๊ทธ๋ ์ด๋ํ๋ ๋์ ์ด ๋ฌธ์ ์ ๋ถ๋ช์ณค์ต๋๋ค. ์ฐ๋ฆฌ๋ AngularJS๋ฅผ ์ฌ์ฉ ์ค์ด๋ฉฐ Protractor 5.4.1 ๋ฐ 5.4.2 ๋ชจ๋์์ ๋ฐ์ํฉ๋๋ค. Typescript 3.6.4(3.6.x)์์๋ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ง ์์ง๋ง Typescript 3.7.2(3.7.x)์์๋ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค. ์ด ์ฃผ์ ๋ณ๊ฒฝ ์ฌํญ๊ณผ ๊ด๋ จ์ด ์๋ค๊ณ ์๊ฐํฉ๋๋ค. https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#local -and-imported-type-declarations-now-conflict
๊ณ ์ณ์ฃผ์ธ์; ์ฐ๋ฆฌ๋ ๋ฌดํจ ํฉ์ฒด๊ฐ ํ์ํฉ๋๋ค! :)
๋์ผํ ๋ฌธ์ ๊ฐ ์์ต๋๋ค. ๋ด ํ๋ก์ ํธ๋ ๊ฐ๋๊ธฐ 5.4.2์ ์์ผ๋ฉฐ TypeScript 3.7๋ก ๋ง์ด๊ทธ๋ ์ด์ ํ๊ณ ์ถ์ต๋๋ค.
์์ ์ฌํญ์ ๋ฐฑํฌํธํ๋ ๊ฒ์ด ์ข์ต๋๋ค(ํ์คํ ์๋ํจ).
89fbf75d4103db2cd20fd0c1c4ca7efebc52c049
37bef24331c1012bfc2cc7d3fa259a00e69bd192
๋ง์คํฐ์์ 5.4.2๋ก
5.4.2๋ npmjs.com์์ ์ฌ์ฉํ ์ ์๋ ์ต์ ๋ฒ์ ์
๋๋ค.
6.0.0์๋ ์ฃผ์ ๋ณ๊ฒฝ ์ฌํญ์ด ํฌํจ๋์ด ์์ผ๋ฏ๋ก ๋ด ํ๋ก์ ํธ์ ์ข์ง ์์ต๋๋ค.
( https://github.com/angular/protractor/blob/6.0.0/CHANGELOG.md )
CC: @sandersn @heathkit
#5325์ ์ค๋ณต
ํธ์ง: ๋๋ Angular ํ์ด ์๋๋ผ Typescript ํ์์ ์ผํ๋ค๋ ๊ฒ์ ๋ถ๋ช ํ ํด์ผ ํฉ๋๋ค. ๋๋ ์๋ก์ด 5.* ๋ฒ์ ์ ์ถํํ๋ ค๊ณ ๋ ธ๋ ฅํ๊ฒ ๋ค๊ณ ๋งํ ๋ช๋ช ํ์๋ค๊ณผ ์ด์ผ๊ธฐ๋ฅผ ๋๋ด์ง๋ง ๊ทธ ๊ณผ์ ์ด ๊ฐ๋จํ์ง ์๋ค๊ณ ์๊ฐํฉ๋๋ค.
์ค๋ ์ ๋ typescript ๋ฒ์ ์ 3.7.x์์ 3.6.x๋ก ๋ค์ด๊ทธ๋ ์ด๋ํ์ต๋๋ค. ์ ์๋ํฉ๋๋ค. ๊ฐ์ฌํฉ๋๋ค matcasey
@sandersn์ ๋ช ํํ ํด ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค. ๊ทธ๊ฒ์ ๋์ ๋ค์ ์ง๋ฌธ์ด ๋ ๊ฒ์ด์๋ค. ์ฐ๋ฆฌ๋ ํ๋ฆ ์ ์ด์ ์์กดํ์ง ์์ผ๋ฉฐ 6.0.0์ผ๋ก ์ ๋ฐ์ดํธํ๋ ค๊ณ ์๋ํ์ง๋ง ๊ฒ์๋ ํจํค์ง์๋ ์์ง ์์ ์ฌํญ์ด ์๋ ๊ฒ ๊ฐ์ต๋๋ค. ํ์ ๋๊ตฐ๊ฐ๊ฐ ์ฌ๊ธฐ์ ๋๊ธ์ ๋ฌ ์ ์๋ค๋ฉด ์ข์ ๊ฒ์ ๋๋ค. ์ฐ๋ฆฌ๊ฐ ๋ฉฐ์น , ๋ช ๋ฌ ๋๋ ๊ทธ ์ด์์ ์ด์ผ๊ธฐํ๊ณ ์์ต๋๊น?
ํธ์ง: ๋์์ ๋๋ฆฌ๊ณ ์ถ์ง๋ง ๋ณด๋ฅ๋ ์ ๋ฒ์ ์ ์ถ์ํ๋ ๋ฐ "๊ทธ๋ฅ"์ธ ๊ฒ ๊ฐ์ต๋๋ค. :)
ํธ์ง 2: ์ฐ๋ฆฌ ์์คํ ์ ๋๋จธ์ง ๋ถ๋ถ์ด TS 3.7๋ก ์ฎ๊ฒจ๊ฐ๊ธฐ ๋๋ฌธ์ ์ ์๊ฒ ์์ด ๋ ๊ฐ์ง ๋จ์ ์ค ๋ ๋์ ๊ฒ์ tsconfig: https:// www.typescriptlang.org/docs/handbook/module-resolution.html#path -mapping
@mattcasey ํ์ฌ ์์ ์ฌํญ์ด ์ด๋ป๊ฒ ์๋ํ๋์ง ์ข ๋ ์์ธํ ์ค๋ช ํด ์ฃผ์๊ฒ ์ต๋๊น? ์ฌ๋ฐ๋ฅธ ๋ด๋ณด๋ด๊ธฐ ๊ฒฝ๋ก๋ก index.d.ts ํ์ผ์ ๋ณต์ฌํ ๋ค์ ๊ฒฝ๋ก ๋งคํ์ ์ฌ์ฉํ์ฌ ๊ฐ๋๊ธฐ๋ฅผ ์ ํ์ผ์ ๋งคํํ์๊ฒ ์ต๋๊น?
์
๋ฐ์ดํธ ์ ํ/๋
ธ๋ ์ข
์์ฑ
npm install -g @types/node@8
์ ํ/๋ ธ๋๊ฐ devDependencies ๋ฐ ์ข ์์ฑ์ ๋์ด๋์ด ์๋์ง ํ์ธํ์ญ์์ค.
"dependencies": {
...
"@types/node": "^8.10.59",
...
},
"devDependencies": {
...
"@types/node": "^8.10.59",
...
}
typescript 3.7.2๋ฅผ ์ฌ์ฉํ๋ ๋ชจ๋์์ ์ด๋ฐ ์ผ์ด ๋ฐ์ํ๋ ๊ฒฝ์ฐ "as" ๋ฌธ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
import { module as otherModuleName } from "./module"
๋๋ ๋ค๋ฅธ ๋ณ์ ์ด๋ฆ์ ์ฌ์ฉํ ์ ์๋๋ก ๋ชจ๋์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ๋ด๋ณด๋ผ ์ ์์ต๋๋ค.
์ค๋ ์ ๋ typescript ๋ฒ์ ์ 3.7.x์์ 3.6.x๋ก ๋ค์ด๊ทธ๋ ์ด๋ํ์ต๋๋ค. ์ ์๋ํฉ๋๋ค. ๊ฐ์ฌํฉ๋๋ค matcasey
"typescript": "~3.6"์ package.json ํ์ผ์ ๋ฃ์ ๋ค์ ํฐ๋ฏธ๋์์ "npm install"์ ์คํํ๋ฉด ์ ์๊ฒ ํจ๊ณผ์ ์ด์์ต๋๋ค. ๊ฐ์ฌ ํด์!
๊ฐ์ ๋ฌธ์ ๊ฐ ์์๊ณ 3.6.4๋ก ๋ค์ด ๊ทธ๋ ์ด๋ํ๋ฉด ์๋ํ์ต๋๋ค.
๊ฐ์ ๋ฌธ์ ๊ฐ ์ฌ๊ธฐ์, ๋๋์ ์์๋ค npm uninstall -g typescript
์ ๋์ ๋ก์ปฌ ๋ฒ์ ๊ฒ์ tsc
์ฐ์ ์์๋ฅผ ์ทจํ ๊ฒ์
๋๋ค. ๋์ PATH
๋ฅผ ์๋ง์ผ๋ก ๋ง๋ค ์ ์์๋๋ฐโฆ
@ woppa684 ๋ด ์์ ์ ๋ณธ์ง์ ์ผ๋ก ๊ฐ๋๊ธฐ์ ๋ํ ๊ณ ์ ํ ์ ํ์ ๋ง๋ค๊ณ Typescript์ node_modules ๋ด๋ถ์ ์ ํ์ ๋ฌด์ํ๋๋ก ์ง์ํ๋ ๊ฒ์
๋๋ค. ๋ด protractor.d.ts
(๋ด ํ๋ก์ ํธ์ test-e2e/protractor.d.ts
) ํ์ผ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
// Note: This stub exists to override Protractor types which are incompatible with TS 3.7 as of 5.4.2 and 6.0.0
declare module 'protractor' {
let browser: any;
let element: any;
let by: any;
let ExpectedConditions: any;
let until: any;
let Key: any;
}
๊ทธ๋ฐ ๋ค์ tsconfig์์:
{
...
"compilerOptions": {
...
"paths": {
"protractor": ["test-e2e/protractor.d.ts"]
}
}
}
์ด๋ฅผ ํตํด ๊ฐ๋๊ธฐ ๋ฉ์๋๊ฐ ๋ ์ด์ ํ์ ์์ ํ์ง ์๋ค๋ ๋จ์ ์ด ์๋ Typescript 3.7์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
์ฐ๋ฆฌ๊ฐ ์ฌ์ฉํ ๋์ ์๋ฃจ์ ์ https://github.com/angular/protractor/pull/5326/ ์ ์์ ์ฌํญ์ ์ฌ์ฉํ์ฌ ์์ ๋ ๊ฐ๋๊ธฐ ๋น๋ ๋ฅผ ๋ง๋๋ ๊ฒ์ ๋๋ค
์ฐ๋ฆฌ๋ ๊ฐ๋๊ธฐ ๋์ ์์๋ก ์ฌ์ฉํ๋ ๊ฒ๋ณด๋ค
// package.json
"protractor": "tomyam1/protractor-ts3.7-fix"
Angular๋ฅผ ์ฌ์ฉํ๋ ๋ฐ๋ธ์ต์ค์์ ์ด ๋ฌธ์ ๊ฐ ์์ต๋๋ค. ์ด๊ฒ์ ๋ง ์ผ์ด๋๊ธฐ ์์ํ์ต๋๋ค. ๋๋ ๋์๊ฐ์ ๊ทธ๊ฒ์ด ํจ๊ณผ๊ฐ ์๋ค๋ ๊ฒ์ ์์์ ๋๋ถํฐ package.json๊ณผ package-lock.json์ ๊ฐ์ ธ์์ต๋๋ค.
Angular๋ฅผ ์
๊ทธ๋ ์ด๋ํ์ต๋๋ค. ๋ช ๊ฐ์ง ๋ค๋ฅธ typescript ๋ฒ์ ์ ์๋ํ์ต๋๋ค. ๋ด ๋ก์ปฌ ์ปดํจํฐ์์๋ ์๋ํ์ง๋ง ๋ฐ๋ธ์ต์ค์์๋ ์๋ํ์ง ์์ต๋๋ค. ์คํจํ ๊ฒ์ vs build ๋ถ๋ถ๋ฟ์
๋๋ค. npm/ng ํญ๋ชฉ์ ์ ์คํ๋ฉ๋๋ค.
๋ชจ๋ ๊ฒ์ด ๋ด ์์คํ
์์ ์๋ฒฝํ๊ฒ ์๋ํฉ๋๋ค.
https://developercommunity.visualstudio.com/content/problem/855096/npm-ng-suddenly-not-working-conflict-pluginconfig.html
typescript 3.7.2๋ฅผ ์ฌ์ฉํ๋ ๋ชจ๋์์ ์ด๋ฐ ์ผ์ด ๋ฐ์ํ๋ ๊ฒฝ์ฐ "as" ๋ฌธ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
import { module as otherModuleName } from "./module"
๋๋ ๋ค๋ฅธ ๋ณ์ ์ด๋ฆ์ ์ฌ์ฉํ ์ ์๋๋ก ๋ชจ๋์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ๋ด๋ณด๋ผ ์ ์์ต๋๋ค.
@anicarrr , ๊ทํ๊ฐ ์ ๊ณตํ ๋ ๋ฒ์งธ ๋ต๋ณ์ ๋ํ ์๋ฅผ ์ ๊ณตํด ์ฃผ์๊ฒ ์ต๋๊น?
๋ชจ๋ ์ฌ๋์๊ฒ ์ต์์ ์๋ฃจ์ ์ ์๋์ง๋ง tsconfig.json์ ๋ค์์ ์ถ๊ฐํ์ฌ ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์ต๋๋ค.
"skipLibCheck": true
typescript 3.7.2๋ฅผ ์ฌ์ฉํ๋ ๋ชจ๋์์ ์ด๋ฐ ์ผ์ด ๋ฐ์ํ๋ ๊ฒฝ์ฐ "as" ๋ฌธ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
import { module as otherModuleName } from "./module"
๋๋ ๋ค๋ฅธ ๋ณ์ ์ด๋ฆ์ ์ฌ์ฉํ ์ ์๋๋ก ๋ชจ๋์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ๋ด๋ณด๋ผ ์ ์์ต๋๋ค.@anicarrr , ๊ทํ๊ฐ ์ ๊ณตํ ๋ ๋ฒ์งธ ๋ต๋ณ์ ๋ํ ์๋ฅผ ์ ๊ณตํด ์ฃผ์๊ฒ ์ต๋๊น?
๋ด ๋ง์ ๋ค์๊ณผ ๊ฐ์ด ๋ด๋ณด๋ด๊ธฐ๋ฅผ ์๋ฏธํฉ๋๋ค.
export default myModule
๋ฐ๋ผ์ ๊ฐ์ ธ์ฌ ๋ ๋ค์๊ณผ ๊ฐ์ด ์ํ๋ ์ด๋ฆ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
import whateverName from myModule
์ด๊ฒ์ https://github.com/angular/protractor/pull/5326 ์์ ์์ ๋์์ต๋๋ค
fyi: ๊ทธ๋์ tsc ์ปดํ์ผ๋ฌ ์ต์
"skipLibCheck": true
์ ์ฌ์ฉํ๋ฉด ์ด ๋ฌธ์ ์ ์ํฅ์ ๋ฐ๋ ์ฌ๋๋ค์ ๋ํ ์ถฉ๋ถํ ํด๊ฒฐ ๋ฐฉ๋ฒ์ด ๋ ๊ฒ์
๋๋ค.
์๋ ํ์ธ์!
๋ฒ๊ทธ ์ ๊ณ
๋ค์ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.[at-loader] ./node_modules/protractor/built/index.d.ts:5:10 ์ค๋ฅ
TS2440: ๊ฐ์ ธ์ค๊ธฐ ์ ์ธ์ด 'PluginConfig'์ ๋ก์ปฌ ์ ์ธ๊ณผ ์ถฉ๋ํฉ๋๋ค.
[at-loader] ./node_modules/protractor/built/index.d.ts:5:24 ์ค๋ฅ
TS2440: ๊ฐ์ ธ์ค๊ธฐ ์ ์ธ์ด 'ProtractorPlugin'์ ๋ก์ปฌ ์ ์ธ๊ณผ ์ถฉ๋ํฉ๋๋ค.
- ๋ ธ๋ ๋ฒ์ :
10.5.0
- ๊ฐ๋๊ธฐ ๋ฒ์ :
~5.1.2
- ๊ฐ๋ ๋ฒ์ :
^4.2.4
- ๋ธ๋ผ์ฐ์ :
any
- ์ด์ ์ฒด์ ๋ฐ ๋ฒ์
Windows 10
- ๊ฐ๋๊ธฐ ๊ตฌ์ฑ ํ์ผ
const { ์คํ ๋ฆฌํฌํฐ } = require('jasmine-spec-reporter');
export.config = {
allScriptsTimeout: 11000,
์ฌ์: [
'./e2e/ */ .e2e-spec.ts'
],
๋ฅ๋ ฅ: {
'๋ธ๋ผ์ฐ์ ์ด๋ฆ': 'ํฌ๋กฌ'
},
์ง์ ์ฐ๊ฒฐ: ์ฌ์ค,
baseUrl: ' http://localhost :4200/',
ํ๋ ์์ํฌ: '์ฌ์ค๋ฏผ',
jasmineNodeOpts: {
showColors: ์ฌ์ค,
๊ธฐ๋ณธ ์๊ฐ ์ด๊ณผ ๊ฐ๊ฒฉ: 30000,
์ธ์: ํจ์() {}
},
์ค๋น() {
require('๋ ธ๋').register({
ํ๋ก์ ํธ: 'e2e/tsconfig.e2e.json'
});
jasmine.getEnv().addReporter(new SpecReporter({ ์ฌ์: { displayStacktrace: true } }));
}
};
- ๋ฒ๊ทธ ์ฌํ ๋จ๊ณ - npm run build ์คํจ
๊ธฐ๋ฅ ์์ฒญ
ํด๊ฒฐํ ์ ์๋๋ก ๋์์ฃผ์ธ์
์๋ ํ์ธ์ SachinBN์ ๋๋ค.
ํ๋ก์ ํธ์ ์ค์น๋ Typescript์ ๋ฒ์ ์ ๋ณ๊ฒฝํด์ผ ํฉ๋๋ค. VS Code ํฐ๋ฏธ๋์์ ์๋ ๋ช ๋ น์ ์ฌ์ฉํ์ฌ ๋ฒ์ ์ ๋ณ๊ฒฝํฉ๋๋ค(๋ฐ์ดํ ์ ์ธ).
"npm install -g [email protected] "
์๋ฃ๋๋ฉด ์๋ ๋ช ๋ น์ ์ฌ์ฉํ์ฌ VS Code์์ ํ๋ก์ ํธ์ typescript ๋ฒ์ ์ ํ์ธํ์ญ์์ค.
"tsc -v"
3.6.2๋ฅผ ๋ณด์ฌ์ผ ํฉ๋๋ค. package.json ํ์ผ์ ๋์ผํ ๋ฒ์ ์ ์ฌ์ฉํ์ญ์์ค. ๋ฒ์ ์ด 3.6.2๋ก ๋ณ๊ฒฝ๋๋ฉด "tsc"๋ฅผ ๋ค์ ์คํํ๋ฉด ์ค๋ฅ๊ฐ ์ฌ๋ผ์ง๋๋ค.
๋์์ด ๋์๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.
๋ฌธ์ ์ธ์ฌ,
์๋ฉ์ผ
๋ด ๊ฐ๋ ์ฑ์์ ์ด ๋ฌธ์ ๊ฐ ์์๊ณ ์ ์์ ์ํด ์๋์ผ๋ก ์ถ๊ฐ๋๋ ๊ฐ๋๊ธฐ ๊ฐ์ ธ์ค๊ธฐ ๋ฌธ์ ์ ๊ฑฐํ์ฌ ํด๊ฒฐํ ์ ์์ต๋๋ค.
์ข๋ค:
'๊ฐ๋๊ธฐ'์์ { ์์ } ๊ฐ์ ธ์ค๊ธฐ
'๊ฐ๋๊ธฐ'์์ { ์ฝ์ } ๊ฐ์ ธ์ค๊ธฐ
๊ทธ๋ฅ ์ ๊ฑฐํ๋ฉด ์์๋๋ก ์คํ๋ฉ๋๋ค.
๋ด ๊ฒ์ด ์๋ํ์ต๋๋ค. ๊ทํ์ ์ฝ๋๋ ์๋ํ๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.
๋ฌธ์ ์ธ์ฌ,
๋์ฏ ์ง์ฃผ๋ฐ๋์ผ
npx tsc -v
Version 3.8.3
์ต์ ๋ ธ๋ ๋ฐ NPM.
๋ด ํ์ผ
import * as mysql from "mysql2";
const config =
process.env.NODE_ENV == "prod"
? {
connectionLimit: 10,
host: "*********.rds.amazonaws.com",
user: "admin",
database: "p_" + process.env.PROJECT_ID,
password: "*********",
prefix: `p_${process.env.PROJECT_ID}_`
}
: {
connectionLimit: 10,
host: "host.docker.internal",
user: "root",
database: "i**_project",
password: "root",
prefix: ""
};
export const db = mysql.createPool(config);
export const prefix = config.prefix;
๊ทธ๋ฆฌ๊ณ ๋๋ ๊ฐ์ ์ค๋ฅ๊ฐ ์์ต๋๋ค
npm run start
> [email protected] start /workspaces/icod-prt
> npx tsc && node build/index.js
typings/modules/mysql2/index.d.ts:677:1 - error TS2440: Import declaration conflicts with local declaration of 'Connection'.
677 import Connection = require('~mysql2~mysql/lib/Connection');
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typings/modules/mysql2/index.d.ts:679:1 - error TS2440: Import declaration conflicts with local declaration of 'PoolConnection'.
679 import PoolConnection = require('~mysql2~mysql/lib/PoolConnection');
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typings/modules/mysql2/index.d.ts:680:1 - error TS2440: Import declaration conflicts with local declaration of 'Pool'.
680 import Pool = require('~mysql2~mysql/lib/Pool');
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typings/modules/mysql2/index.d.ts:682:1 - error TS2440: Import declaration conflicts with local declaration of 'PoolCluster'.
682 import PoolCluster = require('~mysql2~mysql/lib/PoolCluster');
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typings/modules/mysql2/index.d.ts:684:1 - error TS2440: Import declaration conflicts with local declaration of 'Query'.
684 import Query = require('~mysql2~mysql/lib/protocol/sequences/Query');
๋๋๋ก TypeScript ์ปดํ์ผ๋ฌ๋ ๋ค๋ฅธ ์ฌ๋์ ์ด์ ๋ํ ์ค๋ฅ๋ฅผ ๋น๋ํฉ๋๋ค.
์ค๋ .spec.ts ๋จ์ ํ
์คํธ ํ์ผ์ ์์
ํ๋ ๋์ OP์ ์ ํํ ์ค๋ฅ ๋ฉ์์ง๋ฅผ ๋ฐ์์ต๋๋ค. ๋จ์ ํ
์คํธ์ ๊ฐ๋๊ธฐ๊ฐ ํ์ํ์ง ์์๊ธฐ ๋๋ฌธ์ npm uninstall protractor
๋ฅผ ์ฌ์ฉํ์ฌ ์์๋ก ์ ๊ฑฐํ ๋ค์ TypeScript์์ ์ค์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.
ERROR in src/app/.../...spec.ts:12:30 - error TS2307: Cannot find module 'protractor'.
12 import { EventEmitter } from 'protractor';
์์ธ์ Visual Studio Code๊ฐ ์ค๋ช
ํ ์ ์์ด ์ ์์ ์ธ import { EventEmitter } from '@angular/core';
๋์ ์ด ์๋ ๊ฐ์ ธ์ค๊ธฐ ๋ฌธ์ ์์ฑํ๊ธฐ ๋๋ฌธ์
๋๋ค.
์์ง 4.0.2์์ ์ด๊ฒ์ ์ป์์ต๋๋ค.. ํ
๋ด ๊ฐ๋ ์ฑ์์ ์ด ๋ฌธ์ ๊ฐ ์์๊ณ ์ ์์ ์ํด ์๋์ผ๋ก ์ถ๊ฐ๋๋ ๊ฐ๋๊ธฐ ๊ฐ์ ธ์ค๊ธฐ ๋ฌธ์ ์ ๊ฑฐํ์ฌ ํด๊ฒฐํ ์ ์์ต๋๋ค.
์ข๋ค:
'๊ฐ๋๊ธฐ'์์ { ์์ } ๊ฐ์ ธ์ค๊ธฐ
'๊ฐ๋๊ธฐ'์์ { ์ฝ์ } ๊ฐ์ ธ์ค๊ธฐ๊ทธ๋ฅ ์ ๊ฑฐํ๋ฉด ์์๋๋ก ์คํ๋ฉ๋๋ค.
๋ด ๊ฒ์ด ์๋ํ์ต๋๋ค. ๊ทํ์ ์ฝ๋๋ ์๋ํ๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.๋ฌธ์ ์ธ์ฌ,
๋์ฏ ์ง์ฃผ๋ฐ๋์ผ
์ ์๊ฒ๋ Protractor
๋์ Protractor
EventEmitter
๋ฅผ ๊ฐ์ ธ์จ VSCode์ ์๋ ๊ฐ์ ธ์ค๊ธฐ @angular/core
. ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ฉด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์์ต๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋ชจ๋ ์ฌ๋์๊ฒ ์ต์์ ์๋ฃจ์ ์ ์๋์ง๋ง tsconfig.json์ ๋ค์์ ์ถ๊ฐํ์ฌ ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์ต๋๋ค.