Cannot read property 'typeName' of undefined
Hi @kitajchuk, I recently tried to switch a project over to start developing locally and I encountered this error. I have version 0.4.18 and tried running the sqs buster, but keep getting this error. The page will load at first but will then error out immediately after load. Any thoughts appreciated. Thanks!

It looks like a CSS file is trying to load like a page... How are you loading that CSS file?
I guess for better clarification - how are you trying to load that widgets.css file? Link tag in the header? Also, where is it located in your template structure?
Hi @kitajchuk, I get similar bugs, today it's js source map being parsed as page:
> sqs-log Get local cache for key => page-scripts-underscore-min.map.html
> sqs-log Get local cache for key => page-scripts-underscore-min.map.json
> sqs-log Store local cache for key => page-scripts-underscore-min.map.json
> sqs-log Store local cache for key => page-scripts-underscore-min.map.html
> sqs-log Get local cache for key => page-scripts-underscore-min.map.html
/usr/lib/node_modules/node-squarespace-server/squarespace-template.js:466
pageJson.nodeServer = true;
^
TypeError: Cannot set property 'nodeServer' of null
at Object.renderTemplate (/usr/lib/node_modules/node-squarespace-server/squarespace-template.js:466:25)
Script being used in page like others with SQS script tag. Any thoughts would be great.
<squarespace:script src="underscore-min.js" combo="true" />
Anybody desperate in the meantime*, I had to hack squarespace-server.js with the following:
At the top:
rMap = /\.map$/,
Around line 400:
// Javascript Source Maps
if ( rMap.test( appRequest.params[ 0 ] ) ) {
return;
}
* Once Squarespace had generated a map of underscore, I couldn't get rid of it.
What version of the node server are you running? If you just update it this is already handled from quite some time ago - https://github.com/NodeSquarespace/node-squarespace-server/blob/master/squarespace-server.js#L31
The server is on version 0.5.43.
Hey, yep, on latest version.
I see. You're getting a js map file problem. This is sort of a bummer scenario since you ideally want to allow maps for your actual app js which is super handy. Maybe I can get in there and find a better way to process and try to serve map files.