npm加参数--host启动报错 Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling解决方法

参考:https://blog.csdn.net/qq_41664096/article/details/118961381
使用以下命令启动npm只能本机访问

npm run dev

如果需要网络访问则需要加参数--host

npm run dev --host 0.0.0.0

会报错

(!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling.

解决方法
使用以下方法启动

npx vite --host 0.0.0.0

参考里面的其他方法还没有测试

posted @ 2023-08-18 18:08  minseo  阅读(3606)  评论(0编辑  收藏  举报