Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Can't start squarespace-server (on Windows 10 and on Ubuntu via WSL2)



Hi all, trying to get started with Squarespace developing but can't seem to get the server started. I'm running Windows 10 with node installed globally and available on path (all up to date), and I've also tried installing on Ubuntu via WSL2.

On Windows, the error is as shown below:

At C:\Users\Iamnotacrook\AppData\Roaming\npm\squarespace-server.ps1:12 char:29
+   & "$basedir/echo$exe" off & "$basedir/node_modules/@squarespace/ser ...
+                             ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double
quotation marks ("&") to pass it as part of a string.

On WSL2 there's a few "not found" errors (assuming based on how WSL2 and Windows interact with each other), but also a syntax error.

/mnt/c/Users/Iamnotacrook/AppData/Roaming/npm/node_modules/@squarespace/server/build/distributions/local-developer/bin/r: not found
/mnt/c/Users/Iamnotacrook/AppData/Roaming/npm/node_modules/@squarespace/server/build/distributions/local-developer/bin/run.bat: 3: @rem: not found
/mnt/c/Users/Iamnotacrook/AppData/Roaming/npm/node_modules/@squarespace/server/build/distributions/local-developer/bin/r: not found@rem
/mnt/c/Users/Iamnotacrook/AppData/Roaming/npm/node_modules/@squarespace/server/build/distributions/local-developer/bin/run.bat: 5: Syntax error: "(" unexpected

What I've found so far in the documentation and on forums hasn't helped (closest I found was this thread with the same issue but no solution). I can't find the exact Stackoverflow thread, but I did also try using an older version of the Squarespace server since I heard that an update ruined some things on Windows.

Any help is greatly appreciated.

Edited by iamnotacrook
Link to comment
  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

4 answers to this question

Recommended Posts

  • 0

Right then, I've seen a fair few threads with similar issues but no response. Hopefully this will help someone.

Went through a few different ideas with Squarespace support. Using Bash instead of Powershell/Cmd, and installing a different version of Java did nothing to help.

Instead, I installed an older version of the server (1.6.0) by using the following command:

 npm i -g @squarespace/server@1.6.0

Link to comment
  • 0

Final steps for me:

 - Downgrade to server@1.6.0
 - Use git bash, not to install, just to run the server. (baffling, but actually works).

Absolutely ridiculous how broken this is. No one should ever have to use git bash on windows.

Edited by JohnAustin
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...