Cannot read property 'toJSON' of undefined
See original GitHub issueI have a project here that uses ngc. However, when I compile the project using TS 2.2.2 and the command ./node_modules/.bin/ngc -p src/lib/tsconfig.json
I get the following error…
TypeError: Cannot read property 'toJSON' of undefined
at Object.sourceMapGeneratorToConsumer (.../node_modules/tsickle/build/src/source_map_utils.js:65:42)
at TsickleCompilerHost.combineSourceMaps (.../flex-layout/node_modules/tsickle/build/src/tsickle_compiler_host.js:167:74)
at TsickleCompilerHost.writeFile (.../flex-layout/node_modules/tsickle/build/src/tsickle_compiler_host.js:111:28)
at Object.writeFile (.../flex-layout/node_modules/typescript/lib/typescript.js:64240:132)
at Object.writeFile (.../flex-layout/node_modules/typescript/lib/typescript.js:9020:14)
at printSourceFileOrBundle (.../flex-layout/node_modules/typescript/lib/typescript.js:61197:20)
at emitSourceFileOrBundle (.../flex-layout/node_modules/typescript/lib/typescript.js:61155:21)
at Object.forEachEmittedFile (.../flex-layout/node_modules/typescript/lib/typescript.js:8986:17)
at Object.emitFiles (.../flex-layout/node_modules/typescript/lib/typescript.js:61137:12)
at emitWorker (.../flex-layout/node_modules/typescript/lib/typescript.js:64294:33)
I would expect that this is probably related to using TS 2.2
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (4 by maintainers)
Top Results From Across the Web
Cannot read property 'toJSON' of undefined
model is undefined in my backbone view. Here's my script: var TheModel = Backbone.Model.extend({ defaults: ...
Read more >Cannot read property 'toJson' of undefined when bundling ...
1.13.1 TypeError: Cannot read property 'toJson' of undefined when ... parts are in my config.json, I either get a result or it is...
Read more >Email not delivering with error "Cannot read property ' ...
I just ran into an error when trying to send out a newsletter: “Cannot read property 'toJSON' of null”. My Ghost install is...
Read more >KB233002: Unable to get property 'toJson' of undefined or ...
In MicroStrategy Web, an ESRI map widget may return an error regarding 'Unable to get property 'toJson' of undefined or null reference'. This ......
Read more >Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError : Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jrgleason @ThomasBurleson It looks like the issue is that you specify a maproot of “” in your tsconfig. Can you remove that setting?
This sounds like a bug in ngc.