跳至主要內容

Debug in blog

LPrincess大约 1 分钟vuepress2.0Blog

😩Problem

记录在建站期间所遇到的各种各样莫名其妙的问题

报错1

Error: useRouteLocale() is called without provider.error Command failed with exit code 1.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

解决方法:

yarn add punycode

再build一下,就成功了。

报错2

2023/12/08 13:38:01 \[emerg\] 243047#0: bind() to 0.0.0.0:80 failed (98: Address already in use) 2023/12/08 13:38:01 \[emerg\] 243047#0: still could not bind()

解决方法:

卸载apache2

//1. 删除apache
sudo apt-get --purge remove apache2
sudo apt-get --purge remove apache2.2-common
 
//2.找到没有删除掉的配置文件,一并删除
sudo find /etc -name "*apache*" |xargs  rm -rf 
sudo rm -rf /var/www
sudo rm -rf /etc/libapache2-mod-jk
 
//3.删除关联,这样就可以再次用apt-get install apache2 重装了
#dpkg -l |grep apache2|awk '{print $2}'|xargs dpkg -P//注意:这一步可能会报错,但也没关系
 

在本地build的时候遇到了一个报错:

本地直接yarn docs:build会报错:

Error: ENOTDIR: not a directory, scandir '/www/wwwroot/blog.lprincess.top/vuepress/src/.vuepress/dist/.user.ini'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

这里显示ENOTDIR错误表明你的系统尝试对一个预期中应该是目录的路径执行扫描操作,但这个路径实际上是一个文件。问题文件是.user.ini,它位于你的VuePress的dist文件夹中。

直接找到.user.ini文件,删除就可以了

未解决

  • (node:35012) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created)
  • [@mdit/mathjax] "mathjax-full" is not installed!
    • error An unexpected error occurred:"https://registry.npm.taobao.org@mdit%2fmathjax-full: Not found".info If you think this is a bug, please open a bug report with the information provided in "E:\\Study\\blog\\vuepress\\yarn-error.log".info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
  • ⠙ Rendering pages /[Vue warn]: Invalid vnode type when creating vnode: undefined.
上次编辑于:
贡献者: L-mj0