node-squarespace-server icon indicating copy to clipboard operation
node-squarespace-server copied to clipboard

TypeError: Cannot read property 'layout' of undefined

Open johnchourajr opened this issue 9 years ago • 3 comments

I get this issue when I run sqs server --reload

TypeError: Cannot read property 'layout' of undefined
    at getFolderRoot (/usr/local/lib/node_modules/node-squarespace-server/squarespace-server.js:319:51)
    at onExpressRouterGET (/usr/local/lib/node_modules/node-squarespace-server/squarespace-server.js:418:19)
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/node-squarespace-server/node_modules/express/lib/router/layer.js:82:5)
    at next (/usr/local/lib/node_modules/node-squarespace-server/node_modules/express/lib/router/route.js:100:13)
    at Route.dispatch (/usr/local/lib/node_modules/node-squarespace-server/node_modules/express/lib/router/route.js:81:3)
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/node-squarespace-server/node_modules/express/lib/router/layer.js:82:5)
    at /usr/local/lib/node_modules/node-squarespace-server/node_modules/express/lib/router/index.js:234:24
    at Function.proto.process_params (/usr/local/lib/node_modules/node-squarespace-server/node_modules/express/lib/router/index.js:312:12)
    at /usr/local/lib/node_modules/node-squarespace-server/node_modules/express/lib/router/index.js:228:12
    at Function.match_layer (/usr/local/lib/node_modules/node-squarespace-server/node_modules/express/lib/router/index.js:295:3)

johnchourajr avatar Mar 22 '16 06:03 johnchourajr

Getting the same issue for some reason. Cannot even login.

mikehuebner avatar May 06 '16 08:05 mikehuebner

I got this the other day and a cache bust fixed it. Does your problem persist after running the sqs buster?

sqs buster

foleyatwork avatar May 11 '16 20:05 foleyatwork

I got it working out of random. I just re-installed the module and it seemed to start working fine. If you don't have an index page on the Squarespace site, it won't work either I found out. I either missed the documentation on that or there is none.

So basic steps to set this up:

  • Have a SquareSpace account (that is a given)
  • Turn developer mode on in the squarespace backend
  • Create a default index page (something just to display as the home page)
  • Run sqs buster
  • sqs server --reload

Ultimately decided not to use squarespace as I could not really develop my own template in it. I have yet to hear back from Customer Support on any other situation pertaining to this. But I guess this is not the place for this.

Thanks for the reply though!

Mike Huebner Designer & Developer http://mikehuebner.com

On May 11, 2016, at 01:24 PM, Kevin Foley [email protected] wrote:

I got this the other day and a cache bust fixed it. Does your problem persist after running the sqs buster? sqs buster — You are receiving this because you commented. Reply to this email directly or view it on GitHub

mikehuebner avatar May 13 '16 18:05 mikehuebner