【发布时间】:2017-12-09 19:16:14
【问题描述】:
throw new TSError(formatDiagnostics(diagnosticList, cwd, ts, lineOffset))
^
TSError: ⨯ Unable to compile TypeScript
Cannot find type definition file for 'jasmine'. (2688)
Cannot find type definition file for 'node'. (2688)
api/public/reports/api-report.spec.ts (1,46): Cannot find module './api-report'. (2307)
...
20 lines of different modules not found
src/api/public/reports/api-report.spec.ts (134,17): Cannot find name 'expect'. (2304)
^ 尝试使用 test 作为“jasmine-ts /folder/*.spec.ts”进行“npm test”时出现上述错误
Ubuntu 16.04
我已经广泛查看,重新安装了 node、npm、nvm、jasmine。看了我的代码。不知道它可能是什么。
【问题讨论】:
-
它可能会引导你到一个更好的地方 :) 我发现使用 typescript together with webpack 是一种更愉快的体验 :) 编辑:你确实需要为你的依赖项做
npm i -D @types/[module]
标签: node.js ubuntu typescript npm jasmine