<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Soundi&#39;s blog</title>
        <link>http://175.24.98.157:8360</link>
        <description>甜椒的博客</description>
        <atom:link href="http://175.24.98.157:8360/rss.html" rel="self" />
        <language>zh-cn</language>
        <lastBuildDate>Fri, 29 May 2026 22:06:21 GMT</lastBuildDate>
        
        <item>
            <title>记一个Mac M2 + Node14 + node-sass的坑</title>
            <link>http://175.24.98.157:8360/post/node.html</link>
            <description><![CDATA[
            <div class="toc"></div><p>由于 NestJS 项目需要 node16 以上，所以装了 nvm 用来管理 node 版本----由此开始产生问题。</p>
<ol>
<li>换源。
<code>Syntax Error: Error: Cannot find module &#39;node-sass&#39; Require stack</code> 大部分的文章都会提到是源的问题，换源重装即可。但是没有解决问题。</li>
<li>删除 node-sass 重装。来到第二步，原因是 sass-loader 版本低，无法兼容 node-sass，此时可以选择升级重装。但是没有解决问题。</li>
<li>指定 node-sass 版本重装。这一步大部分文章指出是 node-sass 以及 sass-loader 与当前 node 版本不对应，查找到对应 node 版本的版本号重装即可。但还是没有解决问题。</li>
</ol>
<p>此时已经开始陷入迷茫，我又仔细查看了一遍错误日志，发现提示 Python 环境有问题，虽然没有动过相关环境，Mac 也自带了 Python3 环境，但还是查找了一下解决办法。</p>
<ul>
<li>由于 Mac 的 Rootless 环境，使用 Root 权限依然无法修改<code>/usr/local/bin</code>中的文件，所以先<code>whereis python3</code>找到 Python3 的路径，拷贝一份出来并修改名称为 Python，然后配置环境变量<code>export PATH=/usr/local(此处为拷贝出来的 Python3 路径):$PATH</code>，然后<code>source ~/.bash_profile</code>或者重启终端。</li>
</ul>
<p>配置好 Python 环境后，重新 <code>npm i</code>，提示<code>FATAL ERROR: wasm code commit Allocation failed - process out of memory</code>，根据<a href="https://qa.1r1g.com/sf/ask/4609941031/">一个回答</a>中的相关描述，Arm64 架构对于 Node@14 的支持有一些问题，于是参考 Github 上 NVM 的相关 issue 以及<a href="https://www.lsjlt.com/news/400633.html">文章</a>的描述，发现 M 系列芯片 安装 16 版本之前的 Node 时，需要使用 rosetta 启动终端。解决办法是：</p>
<ul>
<li>找到应用程序的“终端” -&gt; 点击显示简介 -&gt; 在简介信息中勾选“使用 Rosetta 打开” -&gt; 打开后重装 <a href="mailto:Node@14.16.0">Node@14.16.0</a> -&gt; 关闭终端。
切出 item2 后，执行<code>npm run dev</code>发现提示<code>Node Sass could not find a binding for your current environment: OS X 64-bit</code>，按照提示中的解决办法，使用<code>npm rebuild node-sass</code>，rebuild 完成后重新运行项目，Done！</li>
</ul>

            ]]></description>
            <pubDate>Wed, 18 Oct 2023 02:58:18 GMT</pubDate>
            <guid>http://175.24.98.157:8360/post/node.html</guid>
        </item>
        
        <item>
            <title>Front-end</title>
            <link>http://175.24.98.157:8360/post/front-end.html</link>
            <description><![CDATA[
            <div class="toc"></div><p>log位置：
<code>AppData\Local\npm-cache\_logs</code></p>
<hr>
<ul>
<li><a href="https://www.yisu.com/zixun/159847.html">CSS scoped原理</a></li>
</ul>
<hr>
<p>页面生成二维码：</p>
<ul>
<li>qrcode
<a href="https://www.cnblogs.com/belongs-to-qinghua/p/12197878.html">例子（生成周围白色边框）</a></li>
<li>vue-qr（二维码内部可以生成icon）
<a href="https://blog.csdn.net/weixin_44867717/article/details/124040965?ydreferer=aHR0cHM6Ly93d3cuYmFpZHUuY29tL2xpbms%2FdXJsPTRZUnAwbURObWxxdUZLallYSlR0cjF1aWtGRlJuVkNEeVprQWNtand4ajd4ejQ5VUNHeXp0RnNJSFlVYWhlQld3dVRfWG1SV28wYkVQc3RiTS1Ka1FFMnZ5MGJ1RnNtZHFZY0lPdmliM1FlJndkPSZlcWlkPWU1YTRiZTk2MDAwMmNhZTMwMDAwMDAwMjY0M2UyYzZi">例子</a></li>
</ul>
<hr>
<p>性能优化：</p>
<ul>
<li>小程序长列表渲染：<a href="https://shimo.im/docs/913JM5bzn9cgbKAE/">https://shimo.im/docs/913JM5bzn9cgbKAE/</a> </li>
</ul>

            ]]></description>
            <pubDate>Wed, 19 Apr 2023 05:19:28 GMT</pubDate>
            <guid>http://175.24.98.157:8360/post/front-end.html</guid>
        </item>
        
        <item>
            <title>埋点</title>
            <link>http://175.24.98.157:8360/post/front/end/1.html</link>
            <description><![CDATA[
            <div class="toc"><ul>
<li><a href="#toc-c28">何为埋点</a></li>
<li><a href="#logan">logan</a></li>
</ul>
</div><h3><a id="toc-c28" class="anchor" href="#toc-c28"></a>何为埋点</h3>
<p>前端埋点指的是通过监控用户的操作行为，统计用户端产品的使用情况。以监控数据为基础，分析产品的优化方向。</p>
<ol>
<li>前端监控: <ul>
<li>数据监控：监听用户信息和行为</li>
<li>性能监控：监听前端的性能，主要包括监听网页或者说产品在用户端的体验</li>
<li>异常监控：监听前端代码在执行过程中也会发生异常，主要包括Javascript 的异常监控、样式丢失的异常监控、服务器请求的异常监控</li>
</ul>
</li>
<li>前端埋点<ul>
<li>手动埋点：也叫代码埋点，即手动添加埋点代码，调用埋点sdk函数，统计数据，调用业务逻辑功能接口，上报埋点数据</li>
<li>无埋点：前端自动收集所有事件，上报埋点数据，通过后端过滤以及计算统计数据</li>
<li>可视化埋点：通过可视化交互的手段，代替上述的代码埋点。将业务代码和埋点代码分离，提供一个可视化交互的页面，输入为业务代码，通过这个可视化系统，可以在业务代码中自定义的增加埋点事件等等，最后输出的代码耦合了业务代码和埋点代码</li>
</ul>
</li>
<li>实际使用：<ul>
<li>用手动埋点获取自定义事件以及自定义属性。</li>
<li>用户的基本信息可以使用无埋点获取。</li>
</ul>
</li>
</ol>
<h3><a id="logan" class="anchor" href="#logan"></a>logan</h3>
<p>日志输入
日志存储
后端系统
前端系统</p>

            ]]></description>
            <pubDate>Tue, 22 Nov 2022 08:27:18 GMT</pubDate>
            <guid>http://175.24.98.157:8360/post/front/end/1.html</guid>
        </item>
        
        <item>
            <title>macOS</title>
            <link>http://175.24.98.157:8360/post/env2.html</link>
            <description><![CDATA[
            <div class="toc"></div><p>引入动态库时提示许多error，找了一圈发现是因为macOS10.14后强制要求签名。</p>
<p>签名步骤：</p>
<ul>
<li>先打开<code>keychain Access.app</code>复制证书签名</li>
<li><code>codesign -f -s &quot;签名&quot; \...\xxx.dylib</code></li>
</ul>
<p>其他操作：</p>
<ul>
<li>清除签名：<code>codesign --remove-signature xxx.dylib</code></li>
<li>查看签名：<code>codesign -v xxx.dylib</code></li>
</ul>

            ]]></description>
            <pubDate>Fri, 19 Jun 2020 10:28:28 GMT</pubDate>
            <guid>http://175.24.98.157:8360/post/env2.html</guid>
        </item>
        
        <item>
            <title>DEBUG</title>
            <link>http://175.24.98.157:8360/post/environment.html</link>
            <description><![CDATA[
            <div class="toc"><ul>
<li><a href="#toc-d1b">anaconda安装tensorflow</a></li>
</ul>
</div><h3><a id="toc-d1b" class="anchor" href="#toc-d1b"></a>anaconda安装tensorflow</h3>
<hr>
<p><code>Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA</code></p>
<p>两个办法：</p>
<ul>
<li>从<a href="https://github.com/lakshayg/tensorflow-build">这里</a>找到对应版本的tf下载，重新安装。</li>
</ul>
<p><code>pip install {path}tensorflow***.whl</code></p>
<ul>
<li>直接忽略，在代码里添加：</li>
</ul>
<p><code>os.environ[“TF_CPP_MIN_LOG_LEVEL”]=‘2’ # 只显示 warning 和 Error</code></p>
<hr>
<p>item能使用但vscode无法使用，并提示：</p>
<p><code>ModuleNotFoundError: No module named &#39;tensorflow&#39;</code></p>
<ul>
<li>cmd+shift+p在python select interpreter中更换使用的python路径</li>
<li>换一个文件夹（</li>
</ul>
<hr>
<p><code>FutureWarning: Passing (type, 1) or &#39;1type&#39; as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / &#39;(1,)type&#39;.
  _np_qint8 = np.dtype([(&quot;qint8&quot;, np.int8, 1)])</code></p>
<p>numpy版本过高，重装即可。</p>
<hr>
<p>源
<code>-i https://pypi.tuna.tsinghua.edu.cn/simple</code></p>
<hr>
<h3><a id="toc-0d9" class="anchor" href="#toc-0d9"></a>其他</h3>
<hr>
<p><code>RuntimeError: Found 0 files in subfolders of: ...</code></p>
<p>路径问题：路径寻找的是当前文件的子文件中的数据</p>
<hr>

            ]]></description>
            <pubDate>Fri, 10 Apr 2020 16:06:46 GMT</pubDate>
            <guid>http://175.24.98.157:8360/post/environment.html</guid>
        </item>
        
    </channel>
</rss>
