排行榜

  • 用户榜
  • 标签榜
  • 冲榜分奖金

频道

最新最热悬赏待采纳 筛选
  • 0

    回答

  • 13

    浏览

我是照着一个视频教程做的: https://www.youtube.com/watch?v=yH593K9fYvE 完成的代码是这样的: js文件: const express = require('express'); const mongoose = require('mongoose'); const app = express(); const ejs = require('ejs'); app.set('view engine','ejs'); mongoose.connect('mongodb://121.5.***.**:27017/Python'); const python_result = { content: String } const Python = mongoose.model("content", python_result); app.get('/', (req, res) => { Python.find({}, function(err, test){ res.render('index', { ResultList: test }) }) }) app.listen(4000, function() { console.log('server is running') })   index.ejs文件: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Python Result</title> </head> <body> <h1>try3</h1> <% for(i=0; i< ResultList.length; i++) {%> <li><a><%= ResultList[i].content %></a></li> <% } %> </body> </html>   数据库如图:   显示结果只有html的<h1>标签, 数据库内容没有显示出来    

  • 2

    回答

  • 20

    浏览

 原先写前端项目的时候是用VUE+KOA写的,数据源是假数据,用json文件测试的代码,后面要求连接数据库,在koa的基础上连接mongodb,可是之前写代码的时候测试数据是用json文件,现在是用js访问数据库得到数据,按之前的方式访问之后得到的js文件的代码,不是获取的数据,请各位大佬支支招  

  • 1

    回答

  • 21

    浏览

使用下面提示的npm install --save没有效果,请问该怎么解决

  • 2

    回答

  • 29

    浏览

node 中间层 PHP中间层 服务端渲染(ssr) 

  • 1

    回答

  • 7

    浏览

用TaskBuilder能开发哪些类型的应用?

回答 Nodejs_home
采纳率0%
昨天
  • 5

    回答

  • 42

    浏览

  怎么把它变成下边这个啊,大神们  

  • 1

    回答

  • 25

    浏览

// 下面是写在vue  app.vue里面的代码     后端使用node.js写的        async function getWxConfig(){                  await axios({             method: 'post',             url: '/backend/wxServe',             data:{ url: window.location.href.split('#')[0] }   //http://192.168.1.185:8080/wxfront/player              }).then(res=>{                 console.log("后端发送过来的参数",res.data);                         wx.config({                 debug: true,                       // 开启调试模式,                 appId: res.data.appid,              // 必填,公众号的唯一标识                 timestamp: res.data.timestamp,      // 必填,生成签名的时间戳                 nonceStr: res.data.noncestr,        // 必填,生成签名的随机串                 signature: res.data.signature,      // 必填,签名                 jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData'], // 必填,需要使用的JS接口列表             })         })                wx.ready(function() {                 //需在用户可能点击分享按钮前就先调用                 wx.updateAppMessageShareData({                     title: '这是我的第一个视频分享链接',     // 分享标题                     desc: '点击播放视频',                   // 分享描述                     link: 'https://www.aohe-info.com/wxfront/player', // 该链接域名或路径必须与当前页面对应的公众号JS安全域名一致                     imgUrl: '', // 分享图标                     success: function() {                                         // 用户确认分享后执行的回调函数                     },                 })             })         }         getWxConfig()  //开始调用

  • 1

    回答

  • 7

    浏览

1、开启本地服务器后台的时候提示了报错,说找不到 sqlite3 让尝试安装(如下图) 2、根据提示我尝试了 npm install sqlite3 --save 后出现下面的一大串报错(如下图) 根据错误提示在百度上尝试了很多方法: 尝试了删除 node-gyp 重新安装 还有一大堆看不懂的全局查询和全局删除重新安装。。。搞了两天了还是没搞明白。 因为这个服务器资料是去年的,所以个人觉得可能是因为里面部分模块已经升级迭代,可能某些功能已经用不了导致,在此希望有没有技术大佬看到此提问解答一下,如果真大佬,可以有偿解决,感恩。

  • 3

    回答

  • 16

    浏览

安装nodejs和gulp的时候都没问题,但是装semantic的时候报一堆错,不知道是哪里出了问题 C:\Users\Administrator>npm install semantic-ui --save npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x. npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. > semantic-ui@2.4.2 install C:\Users\Administrator\node_modules\semantic-ui > gulp install fs.js:45 } = primordials; ^ ReferenceError: primordials is not defined at fs.js:45:5 at req_ (C:\Users\Administrator\node_modules\natives\index.js:143:24) at Object.req [as require] (C:\Users\Administrator\node_modules\natives\index.js:55:10) at Object.<anonymous> (C:\Users\Administrator\node_modules\graceful-fs\fs.js:1:37) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) npm WARN rollback Rolling back is-extglob@1.0.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\Administrator\node_modules\glob-base\node_modules' npm WARN rollback Rolling back kind-of@3.2.2 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\Administrator\node_modules\is-data-descriptor\node_modules' npm WARN rollback Rolling back kind-of@5.1.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\Administrator\node_modules\is-descriptor\node_modules' npm WARN rollback Rolling back is-glob@2.0.1 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\Administrator\node_modules\parse-glob\node_modules' npm WARN rollback Rolling back glob@3.1.21 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\Administrator\node_modules\globule\node_modules' npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Administrator\package.json' npm WARN Administrator No description npm WARN Administrator No repository field. npm WARN Administrator No README data npm WARN Administrator No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! semantic-ui@2.4.2 install: `gulp install` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the semantic-ui@2.4.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2021-05-04T08_48_20_097Z-debug.log  

  • 2

    回答

  • 44

    浏览

 各位大佬好! 我在使用npm install 时候,还有使用 "vue create projec-name" 创建新项目的时候,均出现了下面的error. 请问这个要怎么修复? 已经重装node很多次了。也清理过缓存。总之Google能找到的办法全都试过了. 我不太理解这是个什么样的问题,是npm在错误的path调用了node嘛? 感谢! 非常急用 /c/Users/zhang/node_modules/.bin/node: line 8: C:\Users\zhang\node_modules\.bin/../node/bin/node: No such file or directory 当使用Vue-Cli 来新建vue项目的时候,会有以下error 另外附上我的npm的configs ; cli configs metrics-registry = "https://registry.npm.taobao.org/" scope = "" user-agent = "npm/6.14.12 node/v14.16.1 win32 x64" ; userconfig C:\Users\zhang\.npmrc ELECTRON_MIRROR = "http://npm.taobao.org/mirrors/electron/" cache = "D:\\Users\\zhang\\AppData\\npm\\cache" msvs_version = "2019" prefix = "D:\\Users\\zhang\\AppData\\npm\\global" registry = "https://registry.npm.taobao.org/" script-shell = "D:\\Program Files\\git\\bin\\bash.exe" strict-ssl = false unsafe-perm = true ; builtin config undefined ; node bin location = C:\Program Files\nodejs\node.exe ; cwd = C:\Users\zhang\Desktop\newtest ; HOME = C:\Users\zhang ; "npm config ls -l" to show all defaults.  

  • 1

    回答

  • 10

    浏览

{{each result.records}} <li class="{{$index%2 == 0 ? 'fl' : 'fr'}}"> </li> {{/each}} 朋友们,是我的格式不对吗,一写each就报错 SyntaxError: Unexpected token R in JSON at position 0  

回答 小鹿呦呦
采纳率0%
4天前
  • 1

    回答

  • 21

    浏览

axios.interceptors.response.use( (config) => { Nprogress.done() return config }, async function (error) { console.log('err', error) // if (error.response.status === 401) { alert('登录信息已过期,请重新登录') await axios.post('/users/loginOut', { account: window.sessionStorage.getItem('account'), }) router.push('/login') Nprogress.done() window.sessionStorage.clear() // } return Promise.reject(error) // return error } ) 响应拦截这样写的。虽然能够跳转到登录页面,但浏览器报错就不懂为什么 而且还有个问题就是,我在服务器的错误处理中返回的值不知道怎么获取,求大佬告知啊 // error handler app.use(function (err, req, res, next) { if (err.name === 'UnauthorizedError') { res.status(401).send({ code: -1, msg: 'token验证失败' }); // 怎么获取这一段返回啊 } else { // set locals, only providing error in development res.locals.message = err.message; res.locals.error = req.app.get('env') === 'development' ? err : {}; // render the error page res.status(err.status || 500); res.render('error'); } });  

  • 1

    回答

  • 6

    浏览

第一个接口 第二个接口 我想在第一个接口拿到第二个接口里的files.file[0].path值,但是会报错picPath is not defined,这是因为picPath在回调函数里,所以先执行打印picPath,再执行picPath的赋值是吗?怎么能能够让赋值语句先执行呢?

回答 weixin_48392354
采纳率0%
6天前
  • 0

    回答

  • 7

    浏览

我创建了两个program,分别创建绑定了一个三角形和正方形的顶点,但是在绘制的时候却只绘制三角形和正方形其中一个(取决于绑定的先后顺序,后绑定的会覆盖先绑定的)。请问这是什么原因呢? 源码如下 const canvas = document.getElementById("canvas-rect"); canvas.width = document.body.clientWidth; canvas.height = document.body.clientHeight; const gl = canvas.getContext("webgl"); if (!gl) { alert("无法初始化WebGL,你的浏览器、操作系统或硬件等可能不支持WebGL。"); return; } const vertexShaderSource = ` attribute vec4 vertexPoint; void main(){ gl_Position = vertexPoint; } `; const fragShanderSource = ` void main(){ gl_FragColor = vec4(1.0,0.0,0.0,1.0); } `; // 第一个program绘制三角形 const program1 = createProgram(vertexShaderSource, fragShanderSource); const buffer1 = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, buffer1); gl.bufferData( gl.ARRAY_BUFFER, new Float32Array([-1, 0, 0, 0, 0, 0, -0.5, 0.5, 0]), gl.STATIC_DRAW ); const vertexPoint1 = gl.getAttribLocation(program1, "vertexPoint"); gl.vertexAttribPointer(vertexPoint1, 3, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(vertexPoint1); // 第二个program绘制正方形 const program2 = createProgram(vertexShaderSource, fragShanderSource); const buffer2 = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, buffer2); gl.bufferData( gl.ARRAY_BUFFER, new Float32Array([0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0]), gl.STATIC_DRAW ); const vertexPoint2 = gl.getAttribLocation(program2, "vertexPoint"); gl.vertexAttribPointer(vertexPoint2, 3, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(vertexPoint2); //gl.TRIANGLE_FAN gl.POINTS gl.TRIANGLE_STRIP gl.TRIANGLES gl.clearColor(0.0, 0.0, 0.0, 1.0); // Clear to black, fully opaque gl.clearDepth(1.0); // Clear everything gl.enable(gl.DEPTH_TEST); // Enable depth testing gl.depthFunc(gl.LEQUAL); // Near things obscure far things gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); // 绘制三角形 gl.useProgram(program1); gl.drawArrays(gl.TRIANGLES, 0, 3); // 绘制正方形 gl.useProgram(program2); gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4); function createProgram(vertexShaderSource, fragShanderSource) { const vertexShader = gl.createShader(gl.VERTEX_SHADER); const fragShader = gl.createShader(gl.FRAGMENT_SHADER); gl.shaderSource(vertexShader, vertexShaderSource); gl.shaderSource(fragShader, fragShanderSource); gl.compileShader(vertexShader); gl.compileShader(fragShader); const shaderProgram = gl.createProgram(); gl.attachShader(shaderProgram, vertexShader); gl.attachShader(shaderProgram, fragShader); gl.linkProgram(shaderProgram); gl.useProgram(shaderProgram); return shaderProgram; } 这段代码要吗绘制一个三角形,要吗绘制一个正方形。怎么同时绘制一个三角形和正方形呢

  • 3

    回答

  • 22

    浏览

只有自己一个人开发 并不是多人开发 error: failed to push some refs to 'https://gitlab.morefun.me/c2b/moreget-custom' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch and integrate the remote changes hint: (e.g. 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

  • 4

    回答

  • 10

    浏览

微信小程序中地图组件点击callout 触发事件 bindcallouttap ,但是返回值,只能拿到 makerid ,能不能拿到 当前maker 的所有值,求大神指教

  • 3

    回答

  • 13

    浏览

Redis stream 使用 Xread Block 命令时。使用同一个连接可以运行XADD命令么?,还是需要再启动一个连接。 使用的是node环境

  • 4

    回答

  • 14

    浏览

我将pages文件夹下面的me.jsx放到了models文件夹中的me文件夹下: 然后修改了路由为对应目录配置: 启动之后就报了以下错误:

  • 3

    回答

  • 27

    浏览

console.log('main1') new Promise((resolve, reject) => { setTimeout(() => { resolve() }) console.log('promise1') }).then(() => { console.log('promise2') }) setTimeout(() => { console.log('settimeout') }, 0) console.log('main2')    

  • 4

    回答

  • 47

    浏览

//引入模块 const http = require("http"); //创建一个服务器 const server = http.createServer(function (req, res){ console.log('服务器被访问了...'); res.end('123'); }); //设置端口号 server.listen(8848,function () { console.log('服务器开启,监听8848......'); })

  • 0

    回答

  • 23

    浏览

请教一下大佬 vue项目调用jar 使用 npm i java 在命令窗口通过js可以调用jar包 ,在vue项目中引用js的函数就报错?

  • 0

    回答

  • 10

    浏览

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined

  • 4

    回答

  • 46

    浏览

执行了之后 是什么问题。 我另外一个还用的好好的之前

  • 2

    回答

  • 19

    浏览

webpack打包时报错:TypeError: Cannot read property 'initialize' of undefined 配置webpack.config.js如下: const path = require('path')   const webpack = require('webpack') const htmlWebpackPlugin = require("html-webpack-plugin")   plugins: [     new htmlWebpackPlugin()   ] 上面是配置htmlwebpackplugin。在网上查到了很多类似错误,但是唯一没有和initialize相关的,请大神们帮帮忙~~

  • 3

    回答

  • 31

    浏览

问题:目前我用typora  + picgo 搭建写作工具,都可以正常使用,可是发现文章中的截图经常被人盗用,所以想要加水印予以标识 ;于是在picgo插件中心搜索picgo-plugin-watermark 插件进行安装,可惜安装完以后重启又显示未安装状态 ; 没办法切换命令行安装,可是安装的时候遇到如下问题 C:\Users\Young\AppData\Roaming\picgo>npm install -g picgo-plugin-watermark npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID npm ERR! request to https://registry.cnpmjs.org/picgo-plugin-watermark failed, reason: Hostname/IP does not match certificate's altnames: Host: registry.cnpmjs.org. is not in the cert's altnames: DNS:r.cnpmjs.org npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Young\AppData\Roaming\npm-cache\_logs\2021-04-27T06_18_53_752Z-debug.log   当前版本: Picgo: 2.2.0         npm : 6.14.9 platform:  win10  尝试办法: 1. 很明显,是网络问题;我尝试翻墙后再次运行以上命令进行安装又提示如下错误: C:\Users\Young\AppData\Roaming\picgo>npm install -g picgo-plugin-watermark > sharp@0.23.4 install D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy) info sharp Using cached C:\Users\Young\AppData\Roaming\npm-cache\_libvips\libvips-8.8.1-win32-x64.tar.gz info sharp Creating D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release info sharp Copying DLLs from D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\lib to D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release prebuild-install WARN install connect ETIMEDOUT 192.30.253.112:443 D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp>if not defined npm_config_node_gyp (node "C:\Users\Young\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\Young\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。 VError.cpp VInterpolate.cpp VImage.cpp win_delay_load_hook.cc d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\libvips\cplusplus\VInterpolate.cpp) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\libv ips-cpp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\libvips\cplusplus\VImage.cpp) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\libvips-cp p.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\libvips\cplusplus\VError.cpp) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\libvips-cp p.vcxproj] 正在创建库 D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release\libvips-cpp.lib 和对象 D:\user\bin\nodejs\node_modules\picgo-plug in-watermark\node_modules\sharp\build\Release\libvips-cpp.exp libvips-cpp.vcxproj -> D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release\\libvips-cpp.dll common.cc metadata.cc stats.cc operations.cc pipeline.cc sharp.cc utilities.cc win_delay_load_hook.cc d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\operations.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\pipeline.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\stats.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\utilities.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\sharp.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\metadata.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\common.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] 正在创建库 D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release\sharp.lib 和对象 D:\user\bin\nodejs\node_modules\picgo-plugin-wat ermark\node_modules\sharp\build\Release\sharp.exp sharp.vcxproj -> D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release\\sharp.node info sharp Creating D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release info sharp Copying DLLs from D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\lib to D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release > picgo-plugin-watermark@1.0.0 postinstall D:\user\bin\nodejs\node_modules\picgo-plugin-watermark > node scripts/rebuild.js undefined D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\scripts\rebuild.js:19 if (err) throw new Error("copy sharp error"); ^ Error: copy sharp error at D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\scripts\rebuild.js:19:18 at FSReqCallback.oncomplete (fs.js:171:23) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! picgo-plugin-watermark@1.0.0 postinstall: `node scripts/rebuild.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the picgo-plugin-watermark@1.0.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Young\AppData\Roaming\npm-cache\_logs\2021-04-27T06_16_03_900Z-debug.log 我明显看到了如下错误: > picgo-plugin-watermark@1.0.0 postinstall D:\user\bin\nodejs\node_modules\picgo-plugin-watermark > node scripts/rebuild.js undefined D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\scripts\rebuild.js:19 if (err) throw new Error("copy sharp error"); ^ Error: copy sharp error at D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\scripts\rebuild.js:19:18 at FSReqCallback.oncomplete (fs.js:171:23) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! picgo-plugin-watermark@1.0.0 postinstall: `node scripts/rebuild.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the picgo-plugin-watermark@1.0.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Young\AppData\Roaming\npm-cache\_logs\2021-04-27T06_16_03_900Z-debug.log 2. 我清楚可能还是由于网络问题没有安装成功;于是在npm仓库源查找国内镜像是否有此插件包 很明显是可以搜索到的 ;尝试配置本地npm源 npm config set registry http://registry.npm.taobao.org 再次执行上述命令,提示成功: C:\Users\Young\AppData\Roaming\picgo>npm i picgo-plugin-watermark npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported > picgo-plugin-watermark@0.0.2 postinstall C:\Users\Young\AppData\Roaming\picgo\node_modules\picgo-plugin-watermark > electron-rebuild --version 6.1.7 √ Rebuild Complete + picgo-plugin-watermark@0.0.2 added 1 package from 1 contributor and audited 213 packages in 21.68s found 0 vulnerabilities C:\Users\Young\AppData\Roaming\picgo>npm i picgo-plugin-watermark@1.0.0 > picgo-plugin-watermark@1.0.0 postinstall C:\Users\Young\AppData\Roaming\picgo\node_modules\picgo-plugin-watermark > node scripts/rebuild.js undefined + picgo-plugin-watermark@1.0.0 added 2 packages from 1 contributor, removed 129 packages, updated 6 packages and audited 85 packages in 10.731s found 0 vulnerabilities 没有报错, 正常来讲;应该是安装成功了才对 ;结果重启Picgo以后发现还是显示未安装状态; 3.  查看本地npm是否有此包 C:\Users\Young\AppData\Roaming\picgo>npm list picgo-plugins@ C:\Users\Young\AppData\Roaming\picgo +-- picgo-plugin-gitee@2.0.3 +-- picgo-plugin-gitee-uploader@1.1.2 | +-- dayjs@1.10.4 | +-- normalize-path@3.0.0 | `-- url-join@4.0.1 `-- UNMET DEPENDENCY picgo-plugin-watermark@1.0.0 +-- sharp@0.23.4 | +-- color@3.1.3 | | +-- color-convert@1.9.3 | | | `-- color-name@1.1.3 | | `-- color-string@1.5.5 | | +-- color-name@1.1.3 deduped | | `-- simple-swizzle@0.2.2 | | `-- is-arrayish@0.3.2 | +-- detect-libc@1.0.3 | +-- nan@2.14.2 | +-- npmlog@4.1.2 | | +-- are-we-there-yet@1.1.5 | | | +-- delegates@1.0.0 | | | `-- readable-stream@2.3.7 | | | +-- core-util-is@1.0.2 | | | +-- inherits@2.0.4 | | | +-- isarray@1.0.0 | | | +-- process-nextick-args@2.0.1 | | | +-- safe-buffer@5.1.2 deduped | | | +-- string_decoder@1.1.1 | | | | `-- safe-buffer@5.1.2 deduped | | | `-- util-deprecate@1.0.2 | | +-- console-control-strings@1.1.0 | | +-- gauge@2.7.4 | | | +-- aproba@1.2.0 | | | +-- console-control-strings@1.1.0 deduped | | | +-- has-unicode@2.0.1 | | | +-- object-assign@4.1.1 | | | +-- signal-exit@3.0.3 | | | +-- string-width@1.0.2 | | | | +-- code-point-at@1.1.0 | | | | +-- is-fullwidth-code-point@1.0.0 | | | | | `-- number-is-nan@1.0.1 | | | | `-- strip-ansi@3.0.1 deduped | | | +-- strip-ansi@3.0.1 | | | | `-- ansi-regex@2.1.1 | | | `-- wide-align@1.1.3 | | | `-- string-width@1.0.2 deduped | | `-- set-blocking@2.0.0 | +-- prebuild-install@5.3.6 | | +-- detect-libc@1.0.3 deduped | | +-- expand-template@2.0.3 | | +-- github-from-package@0.0.0 | | +-- minimist@1.2.5 | | +-- mkdirp-classic@0.5.3 | | +-- napi-build-utils@1.0.2 | | +-- node-abi@2.26.0 | | | `-- semver@5.7.1 | | +-- noop-logger@0.1.1 | | +-- npmlog@4.1.2 deduped | | +-- pump@3.0.0 | | | +-- end-of-stream@1.4.4 | | | | `-- once@1.4.0 deduped | | | `-- once@1.4.0 deduped | | +-- rc@1.2.8 | | | +-- deep-extend@0.6.0 | | | +-- ini@1.3.8 | | | +-- minimist@1.2.5 deduped | | | `-- strip-json-comments@2.0.1 | | +-- simple-get@3.1.0 deduped | | +-- tar-fs@2.1.1 | | | +-- chownr@1.1.4 deduped | | | +-- mkdirp-classic@0.5.3 deduped | | | +-- pump@3.0.0 deduped | | | `-- tar-stream@2.2.0 | | | +-- bl@4.1.0 | | | | +-- buffer@5.7.1 | | | | | +-- base64-js@1.5.1 | | | | | `-- ieee754@1.2.1 | | | | +-- inherits@2.0.4 deduped | | | | `-- readable-stream@3.6.0 | | | | +-- inherits@2.0.4 deduped | | | | +-- string_decoder@1.1.1 deduped | | | | `-- util-deprecate@1.0.2 deduped | | | +-- end-of-stream@1.4.4 deduped | | | +-- fs-constants@1.0.0 | | | +-- inherits@2.0.4 deduped | | | `-- readable-stream@3.6.0 | | | +-- inherits@2.0.4 deduped | | | +-- string_decoder@1.1.1 deduped | | | `-- util-deprecate@1.0.2 deduped | | +-- tunnel-agent@0.6.0 deduped | | `-- which-pm-runs@1.0.0 | +-- semver@6.3.0 | +-- simple-get@3.1.0 | | +-- decompress-response@4.2.1 | | | `-- mimic-response@2.1.0 | | +-- once@1.4.0 | | | `-- wrappy@1.0.2 | | `-- simple-concat@1.0.1 | +-- tar@5.0.5 | | +-- chownr@1.1.4 | | +-- fs-minipass@2.1.0 | | | `-- minipass@3.1.3 deduped | | +-- minipass@3.1.3 | | | `-- yallist@4.0.0 deduped | | +-- minizlib@2.1.2 | | | +-- minipass@3.1.3 deduped | | | `-- yallist@4.0.0 deduped | | +-- mkdirp@0.5.5 | | | `-- minimist@1.2.5 deduped | | `-- yallist@4.0.0 | `-- tunnel-agent@0.6.0 | `-- safe-buffer@5.1.2 `-- text-to-svg@3.1.5 +-- commander@2.20.3 `-- opentype.js@0.11.0 +-- string.prototype.codepointat@0.2.1 `-- tiny-inflate@1.0.3 npm ERR! missing: picgo-plugin-watermark@1.0.0, required by picgo-plugins@ C:\Users\Young\AppData\Roaming\picgo>npm search picgo-plugin-watermark NAME | DESCRIPTION | AUTHOR | DATE | VERSION | KEYWORDS picgo-plugin-watermark | PicGo's watermark… | =dec_f | 2020-02-26 | 1.0.0 | npm node watermark picgo @tbox/test | PicGo's watermark… | =dec_f | 2019-12-26 | 0.0.8-d… | npm node watermark picgo 显示红色状态,为什么这里显示未安装成功? 疑问,暂时想不通为什么,换个源再次强试一下,结果显示如下: C:\Users\Young\AppData\Roaming\picgo>npm install -g picgo-plugin-watermark > sharp@0.23.4 install D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy) info sharp Using cached C:\Users\Young\AppData\Roaming\npm-cache\_libvips\libvips-8.8.1-win32-x64.tar.gz info sharp Creating D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release info sharp Copying DLLs from D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\lib to D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release prebuild-install WARN install connect ETIMEDOUT 192.30.253.112:443 D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp>if not defined npm_config_node_gyp (node "C:\Users\Young\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\Young\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。 VError.cpp VInterpolate.cpp VImage.cpp win_delay_load_hook.cc d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\libvips\cplusplus\VInterpolate.cpp) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\libv ips-cpp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\libvips\cplusplus\VImage.cpp) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\libvips-cp p.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\libvips\cplusplus\VError.cpp) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\libvips-cp p.vcxproj] 正在创建库 D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release\libvips-cpp.lib 和对象 D:\user\bin\nodejs\node_modules\picgo-plug in-watermark\node_modules\sharp\build\Release\libvips-cpp.exp libvips-cpp.vcxproj -> D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release\\libvips-cpp.dll common.cc metadata.cc stats.cc operations.cc pipeline.cc sharp.cc utilities.cc win_delay_load_hook.cc d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\operations.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\pipeline.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\stats.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\utilities.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\sharp.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\metadata.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] d:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\include\glib-2.0\glib\gtestutils.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将 该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\common.cc) [D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\sharp.vcxproj] 正在创建库 D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release\sharp.lib 和对象 D:\user\bin\nodejs\node_modules\picgo-plugin-wat ermark\node_modules\sharp\build\Release\sharp.exp sharp.vcxproj -> D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release\\sharp.node info sharp Creating D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release info sharp Copying DLLs from D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\vendor\lib to D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\node_modules\sharp\build\Release > picgo-plugin-watermark@1.0.0 postinstall D:\user\bin\nodejs\node_modules\picgo-plugin-watermark > node scripts/rebuild.js undefined D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\scripts\rebuild.js:19 if (err) throw new Error("copy sharp error"); ^ Error: copy sharp error at D:\user\bin\nodejs\node_modules\picgo-plugin-watermark\scripts\rebuild.js:19:18 at FSReqCallback.oncomplete (fs.js:171:23) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! picgo-plugin-watermark@1.0.0 postinstall: `node scripts/rebuild.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the picgo-plugin-watermark@1.0.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Young\AppData\Roaming\npm-cache\_logs\2021-04-27T06_16_03_900Z-debug.log C:\Users\Young\AppData\Roaming\picgo> 4. 搜索了网上教程,有说可能版本不对 ; 于是将picgo2.2.0  更换为 最新版2.2.0 (beta6)  ,仍然不可行 ; 5. 单独网上查找picgo-plugin-watermark 发现,npm有指定版本,不过怀疑不是该问题,毕竟不指定版本的话,都以最新版本进行安装;            尝试以后发现,仍然不行  6. 没办法了,只能上 picgo-plugin-watermark 仓库找找原因了 ,发现最新代码都是一年之前且没有更新了 ;  死马当做活马医 ; 看下issue吧 ;但似乎没有可用信息;并且作者也没有进行回复 ;估计是作者也已经不再进行维护了  ;剩下的只能寻求网上各位大佬们帮忙了    

  • 0

    回答

  • 11

    浏览

nodejs里面node.h 头文件在哪里找?

  • 2

    回答

  • 75

    浏览

根据【Js】【调试】VSCode中调试Js代码_Waker的博客-CSDN博客_vscode 调试js代码】 创建了文件 然后用node.js去调试不知道上面那个配置怎么选直接按F5调试就会 请问要怎么操作才能调试

  • 0

    回答

  • 4

    浏览

在umi2的版本里添加了exportStatic,但是打包build的时候会报错(不能升级到umi3的前提下,望大神/大佬回复) 第一张图是npm run build 后返回的错误 第二张图是yarn build 后返回的错误  

  • 2

    回答

  • 70

    浏览

Mac应用需要开发类似“上传到百度网盘”功能,需要在MacOS系统右键增加“上传到...”菜单,未做过mac应用开发,希望可以指点下后面要怎么去做 目前功能实现方法,沙箱签名后功能无法正常运行: 1、Automator生成.workflow文件,并复制到目录~/Library/Services      沙箱签名时,申请目录权限,提交商店被拒      <key>com.apple.security.files.user-selected.read-write</key>     <string>/Library/Services/<string/> 2、 沙盒签名后requestSingleInstanceLock单例锁报错        [67262:0419/140246.020085:ERROR:process_singleton_posix.cc(1039)] Failed to bind() /var/folders/wx/5bbsxn991pb9rjykr4xzqky40000gn/T/tv.jcbox.sharebox/S/SS: Operation not permitted (1)