Coder Social home page Coder Social logo

how do i debug locally? about picpic HOT 14 CLOSED

matrixages avatar matrixages commented on June 9, 2024
how do i debug locally?

from picpic.

Comments (14)

MatrixAge avatar MatrixAge commented on June 9, 2024
  • install vscode plugin:[Open In Default Browser - peakchen90]
  • confirm you assets
  • npm run build
  • open dist and open index.html use Open In Default Browser

from picpic.

sky2v avatar sky2v commented on June 9, 2024

thanks

from picpic.

sky2v avatar sky2v commented on June 9, 2024

抱歉错误仍然存在,浏览器在屏幕中出现logo 之后一片空白,console里面也没有任何信息打印。
环境:win10
浏览器:google浏览器
截图:
image

from picpic.

MatrixAge avatar MatrixAge commented on June 9, 2024

抱歉错误仍然存在,浏览器在屏幕中出现logo 之后一片空白,console里面也没有任何信息打印。
环境:win10
浏览器:google浏览器
截图:
image

直接打开是不行的,用vscode插件,在浏览器地址栏,你应该看到的是一个带端口号的地址。

from picpic.

sky2v avatar sky2v commented on June 9, 2024

抱歉错误仍然存在,浏览器在屏幕中出现logo 之后一片空白,console里面也没有任何信息打印。
环境:win10
浏览器:google浏览器
截图:
image

直接打开是不行的,用vscode插件,在浏览器地址栏,你应该看到的是一个带端口号的地址。

也是一样的呢,我用vscode和webstorm 都试过,不行呢,换台电脑也是不行。直接打开和插件打开应该是一样的都是纯静态页面调用js。
image

from picpic.

sky2v avatar sky2v commented on June 9, 2024

抱歉错误仍然存在,浏览器在屏幕中出现logo 之后一片空白,console里面也没有任何信息打印。
环境:win10
浏览器:google浏览器
截图:
image

直接打开是不行的,用vscode插件,在浏览器地址栏,你应该看到的是一个带端口号的地址。

也是不行呢,webstorm和vscode都试过了呢,没有报错,不知该从何处入手。
image

from picpic.

MatrixAge avatar MatrixAge commented on June 9, 2024

给个例子仓库地址 我看看

from picpic.

sky2v avatar sky2v commented on June 9, 2024

给个例子仓库地址 我看看
必须部署到github_page么,我没有部署github 和 action,本地调试。。拉取的您仓库的源代码进行的build。看来我只能一个一个函数log看一下。
image

from picpic.

sky2v avatar sky2v commented on June 9, 2024

你好,我在dist/libs/js/include.js的replaceIncludeElements函数中打印 includeTals,发现数组值是空的,这是正常的么
var includeTals = document.getElementsByTagName('include')
console.log(includeTals);
image

from picpic.

sky2v avatar sky2v commented on June 9, 2024

你好,我在dist/libs/js/include.js的replaceIncludeElements函数中打印 includeTals,发现数组值是空的,这是正常的么
var includeTals = document.getElementsByTagName('include')
console.log(includeTals);
image

我在知乎看到了您的帖子,编译之后好像模板没有注入进去

from picpic.

MatrixAge avatar MatrixAge commented on June 9, 2024

为什么要用http server来浏览页面,就是因为这里面有一个使用ajax请求html模版的过程,(文章链接)[https://juejin.cn/post/6906791889777721352],我在本地试过了,我这边是ok,你自己捋一下,为什么没有注入成功

from picpic.

MatrixAge avatar MatrixAge commented on June 9, 2024

我把你fork出来的项目拉下来跑了一下,在我这里是没问题的,你用http-server试试看,打不开的原因应该是其他,问题核查完毕,issue关了。

from picpic.

sky2v avatar sky2v commented on June 9, 2024

为什么要用http server来浏览页面,就是因为这里面有一个使用ajax请求html模版的过程,(文章链接)[https://juejin.cn/post/6906791889777721352],我在本地试过了,我这边是ok,你自己捋一下,为什么没有注入成功

我把你fork出来的项目拉下来跑了一下,在我这里是没问题的,你用http-server试试看,打不开的原因应该是其他,问题核查完毕,issue关了。

问题出在路径分隔符号,globby 在全局模式下只能用正斜杆
https://www.npmjs.com/package/globby
Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use path.posix.join() instead of path.join().

from picpic.

sky2v avatar sky2v commented on June 9, 2024

Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use path.posix.join() instead of path.join().

对于windows用户path.join 得到的都是反斜杠,所以匹配不到组件文件

from picpic.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.