【发布时间】:2019-03-09 07:09:22
【问题描述】:
我正在关注developers.squarespace.com 文档,并且正在尝试使用本地开发环境将我的静态网站制作成squarespace 模板。至于启动服务器,一切正常,直到我将 squarespace 服务器安装到我的系统。要开始,我在我的 Mac 终端中使用这个命令:
npm install -g @squarespace/server
在我输入这个之后,一切似乎再次正常工作,因为我遇到了这个(它没有显示任何错误,正如我为其他人看到的那样):
Executing: npm run bundle
> @squarespace/server@1.1.2 bundle /Users/Squid/.npm-global/lib/node_modules/@squarespace/server
> node scripts/bundlejre.js --accept --clear -tz -j 8u131 -o build/distributions/runtimes/jre
Bundling compatible JRE (This may take a while)
> @squarespace/server@1.1.2 cleanupscript /Users/Squid/.npm-global/lib/node_modules/@squarespace/server
> node scripts/execif.js --os=win32 --exists=build node scripts/vetolines.js build/distributions/local-developer/bin/run.bat #!
+ @squarespace/server@1.1.2
updated 1 package in 56.891s
之后,我从 git 将我的网站克隆到桌面上的一个文件夹中,然后导航到终端中的文件夹。此时,我尝试通过运行以下命令启动开发服务器(将“站点名称”更改为我的站点名称:
squarespace-server https://site-name.squarespace.com
我的问题从这里开始,我收到了来自终端的以下响应:
-bash: squarespace server: command not found
我的 mac 无法识别服务器,即使我在计算机上手动找到了该文件夹(但我不知道如何处理它)。 到目前为止,我尝试了几种故障排除方法:
- 我有一个试用站点,因此我尝试按照文档中的建议使用 --auth 标志。
- 我重新启动了整个过程,因此我从系统中删除了所有与节点和 squarespace 相关的文件并重新开始。
- 在网上寻找答案后,我安装了homebrew 以确保我将 node 和 git 正确安装到我的系统中。
- 最后,我尝试更改 npm 的权限(但我不确定这部分是否正确,因为我没有收到任何权限错误)。
另外,非常感谢您阅读所有这些内容。我只是真的想确保你们都了解我在整个过程中所处的位置。
【问题讨论】:
标签: server terminal development-environment squarespace