Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this api does not exist的问题 #8

Closed
foreverwing99 opened this issue Sep 8, 2017 · 17 comments
Closed

this api does not exist的问题 #8

foreverwing99 opened this issue Sep 8, 2017 · 17 comments

Comments

@foreverwing99
Copy link

你好,我使用的是mac电脑,采用的是源码部署方式,在浏览器中输入的url为:http://127.0.0.1:8080/,我点击了“try without login”遇到了"this api does not exist的问题"。
image,请求大神帮忙看一下。
image
image

@foreverwing99
Copy link
Author

我进行注册的时候也遇到一样的问题,请求帮助。

@brookshi
Copy link
Owner

brookshi commented Sep 9, 2017

你好, 是url不对,看起来myhost没被替换掉,麻烦贴下Hitchhiker目录下的pm2.json文件内容

@foreverwing99
Copy link
Author

image
是这个文件吗?

@brookshi
Copy link
Owner

brookshi commented Sep 9, 2017

是的,确实没换掉, linux_deploy.sh里的myhost是有换掉吧

@foreverwing99
Copy link
Author

image
换成我的电脑的ip地址是吗哈?

@brookshi
Copy link
Owner

brookshi commented Sep 9, 2017

对的,看起来是我的脚本写得有点问题,sed -i 's/myhost/$'myhost'/g' pm2.json 这行没起作用,奇怪我在ubuntu上试了是可以的,我去mac上试一下

@foreverwing99
Copy link
Author

嗯嗯 好的好的,谢谢你哈

@brookshi
Copy link
Owner

brookshi commented Sep 9, 2017

着急用的话可以改下 Hitchhiker/build/public/static/js/main.**.js, 找到 myhost,换成ip:port,然后在Hitchhiker目录下运行命令 pm2 skill & pm2 start pm2.json

@brookshi
Copy link
Owner

brookshi commented Sep 9, 2017

不客气,是我的问题

@foreverwing99
Copy link
Author

好的 好的 ,谢谢哈~~~你share的工程对我帮助很大呢~~~嘿嘿

@foreverwing99
Copy link
Author

我刚接触软件不是很多,刚刚搜索了一下,并在我电脑上新建了一个小文件试了一下,似乎生效。

`问题一
sed编辑命令:【sed -i ‘s/a/b/g‘ test.txt】

报错:sed: 1: "test.txt": undefined label ‘est.txt‘

解决方案:增加一个备份的追加名【sed -i ‘.bak‘ ‘s/a/b/g‘ test.txt】

原因:mac强制要求备份,否则报错
当然可以不使用其他备份名字,只是用’‘,就可以只保留一份
sed -i ‘’ ’s/a/b/g’ test.txt`

@brookshi
Copy link
Owner

brookshi commented Sep 9, 2017

是的,我刚在mac上试了下,用 sed -i '' "s~myhost~$myhost~g" pm2.json 就可以了,我改下

@brookshi
Copy link
Owner

brookshi commented Sep 9, 2017

mac 是 基于BSD的unix,sed命令与linux不太一样

@foreverwing99
Copy link
Author

嗯嗯 感觉你知识好渊博,我对linux命令和nodejs几乎一无所知,正在努力学习你的东东,要加油加油努力才行~~~

@brookshi
Copy link
Owner

brookshi commented Sep 9, 2017

哈哈,过奖了,我也是杂七杂八的学,都不精通,更新了脚本和文档,不过没找到两类系统都可以用的脚本,所以在mac上需要替换下sed那行

@foreverwing99
Copy link
Author

你好,我用“sudo sh linux_deploy.sh”替代“source ./linux_deploy.sh”这个命令可以吗?因为我用“source ./linux_deploy.sh”这个命令的时候会报错很多权限不足,且我在前面加sudo也会报错,所以我用“sudo sh linux_deploy.sh”这个命令,但是在登陆的是sign in一直在转圈,登陆不进去,下面的console也没有报错,不知道是怎么回事

@brookshi
Copy link
Owner

数据库问题,因为存了column为json的字段,mysql需要5.7+版本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants