我正在努力使源代码地图工作,当开发类型记录中的firebase函数时。
在我的tsconfig.json文件中,已启用源映射。
这就生成了源地图。然后,我将这一行包含在我的index.ts文件中:
import 'source-map-support/register';然后它似乎起作用了。这是否正确配置,并将source-map-support配置为项目package.json文件?
发布于 2018-07-14 01:18:33
是的,您需要做一些事情,其中一些是有文档化的这里
npm install source-map-supportsourceMap in tsconfig.json (而不是 package.json!)加入: "compilerOptions": {
"sourceMap": true,
...
},import 'source-map-support/register'require('source-map-support').install();其结果将改变这种情况:
TypeError: Cannot read property 'current_location' of null
at /user_code/lib/http_actions.js:173:74
at next (native)
at fulfilled (/user_code/lib/http_actions.js:4:58)
at process._tickDomainCallback (internal/process/next_tick.js:135:7)这方面:
TypeError: Cannot read property 'current_location' of null
at /user_code/src/http_actions.ts:183:33
at next (native)
at fulfilled (/user_code/lib/http_actions.js:4:58)
at process._tickDomainCallback (internal/process/next_tick.js:135:7)https://stackoverflow.com/questions/51321965
复制相似问题