iamnotacrook Posted August 19, 2020 Share Posted August 19, 2020 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. off off /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. Link to comment
iamnotacrook Posted August 21, 2020 Author Share Posted August 21, 2020 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
JohnAustin Posted October 25, 2020 Share Posted October 25, 2020 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. Link to comment
JohnAustin Posted October 25, 2020 Share Posted October 25, 2020 Actually server@1.6.0 apparently has a issue with compiling the default `.less` templates. So I ended up using 1.6.2, and now my site shows up fine, locally. (Still on git bash though). Link to comment
vnn8248 Posted October 29, 2020 Share Posted October 29, 2020 What versions of node and npm are you using? I have the same issue smh. However, after downgrading to server 1.6 the error still persists... Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.