本文共 836 字,大约阅读时间需要 2 分钟。
gatsby
I created a site using and I ran gatsby develop
to start a local server.
我使用创建了一个网站,并运行了gatsby develop
来启动本地服务器。
But a weird error showed up, coloring with red my terminal:
但是出现了一个奇怪的错误,终端显示为红色:
After a few searches across GitHub and StackOverflow (I found a lot of people with the same problem!) and this is what fixed the error.
在GitHub和StackOverflow上进行了几次搜索之后(我发现很多人都遇到同样的问题!),这就是修复错误的原因。
First, I deleted node_modules
:
首先,我删除了node_modules
:
rm -rf node_modules
then I used instead of npm install
:
然后我用代替了npm install
:
yarn
This installed all the packages again.
这将再次安装所有软件包。
Finally I ran gatsby develop
and it worked.
最终,我运行了gatsby develop
,并且运行正常。
Not sure what the cause problem is/was, but I tried again running npm install
instead of yarn
and it didn’t work.
不知道是什么原因造成的,或者是,但是我再次尝试运行npm install
而不是yarn
,它没有用。
翻译自:
gatsby
转载地址:http://ttmgb.baihongyu.com/