2016-07-17 8 views
0

내 서버 .ts 모듈을 설치하고 node_modules을 검사했지만 파일에 모듈 및 입력을 찾을 수 없다는 불만이 있습니다. Typescript가 모듈을 찾을 수 없습니다.

내 프로젝트 구조입니다 : screenshot

오류 내가 얻을 : screenshot

tsconfig.json :

{ 
    "compilerOptions": { 
     "module": "commonjs", 
     "moduleResolution": "node", 
     "target": "es5", 
     "sourceMap": true, 
     "emitDecoratorMetadata": true, 
     "experimentalDecorators": true, 
     "noImplicitAny": false 
    }, 
    "exclude": [ 
     "node_modules", 
    "typings" 
    ], 
    "filesGlob": [ 
    "**/*.ts", 
    "typings/main", 
    "./typings/index.d.ts" 
    ] 
} 
+0

'tscg'를 사용하여 코드를 컴파일하고 있습니까? –

+0

아니오 .............................. –

+0

https://www.npmjs.com/package/typescript-with- 글로브 –

답변

0

filesGlob 아직 기본 타이프에서 지원되지 않습니다 (github)

내 제안은 filesGlob 섹션을 제거하는 것입니다. 실제로 필요하지 않은 것 같습니다. 대신

{ 
    "compilerOptions": { 
     "module": "commonjs", 
     "moduleResolution": "node", 
     "target": "es5", 
     "sourceMap": true, 
     "emitDecoratorMetadata": true, 
     "experimentalDecorators": true, 
     "noImplicitAny": false 
    }, 
    "exclude": [ 
     "node_modules", 
     "typings/browser.d.ts", 
     "typings/browser/**" 
    ] 
} 

희망이 있습니다.

관련 문제