Nodejs token使用问题

目前已经实现了登录产生token和token验证(后端服务器端产生、验证)。

但是还需要一下两个需求:

1、每次请求都刷新该token的过期时间。比如,1:00产生一个有效期为1h的token,我

在1:30的时候,请求了一次,需要刷新token过期时间为2:30。而且能否不改变原来token

2、主动使某个token失效。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
如何对jwt生成的token 实现验证(已经可以验证)、过期处理以及token刷新

这是我的jwt 模块, ``` // 引入模块依赖 const fs = require('fs'); const path = require('path'); const jwt = require('jsonwebtoken'); // 创建 token 类 class Jwt { constructor(data) { this.data = data; this._id = null; // 用户自定义 存放userid this._date = null; // 过期时间 this._creatDate = null; // 创建时间 } // 重新生成 token refreshToken() { let data = this.data; let created = Math.floor(Date.now() / 1000); let cert = fs.readFileSync(path.join(__dirname, './pem/private_key.pem'));//私钥 可以自己生成 let token = jwt.sign({ data, exp: created + 60 * 30, // 过期时间 iat: created, // 创建时间 }, cert, {algorithm: 'RS256'}); return token; } //生成token generateToken(data) { if (data) { this.data = data; } let data = this.data; let created = Math.floor(Date.now() / 1000); let cert = fs.readFileSync(path.join(__dirname, './pem/private_key.pem'));//私钥 可以自己生成 let token = jwt.sign({ data, exp: created + 60 * 30, // 过期时间 30 分钟 iat: created, // 创建时间 }, cert, {algorithm: 'RS256'}); return token; } // 校验token verifyToken(data) { if (data) { this.data = data; } let token = this.data; let cert = fs.readFileSync(path.join(__dirname, './pem/public_key.pem'));//公钥 可以自己生成 let res; try { let result = jwt.verify(token, cert, {algorithms: ['RS256']}) || {}; this._id = result.data; this._date = result.exp; this._creatDate = result.iat; let {exp = 0} = result, current = Math.floor(Date.now() / 1000); if (current <= exp) { res = result.data || {}; } } catch (e) { res = 'err'; } return res; } } module.exports = Jwt; ``` 我要在 app.js 中新增一个中间件拦截请求对token进行验证正确与否,是否过期,是否需要重新生成token,是否直接返回前端重新登录,这里边是怎样的一个过程以及实现token的刷新,失效处理的方法

NodeJS crypto.createHmac SHA256无法正常工作

<div class="post-text" itemprop="text"> <p>I'm currently trying to implement the authentication part of a library we're using but I've stumbled upon a weird issue with the signing of the data, the output of crypto.createHmac in NodeJS is roughly half the size of that of hash_hmac in PHP and this is the only part of the data which differs between PHP and NodeJS (and we need to use NodeJS here)</p> <p>The exact code used for creating the signature in NodeJS is,</p> <pre><code>authorization["oauth_signature"] = crypto.createHmac('SHA256', process.env.SECRET).update(toSign).digest('base64'); </code></pre> <p>And for PHP it is</p> <pre><code>$authorization["oauth_signature"] = base64_encode(hash_hmac("SHA256", $signatureString . $signingKey, $secret)); </code></pre> <p>However the output of the NodeJS version is</p> <pre><code>7LkQP+qKR1gSdPq/AgH/3No3ps7EtZXnqwjivMixvM8= </code></pre> <p>And for PHP it is</p> <pre><code>NmQ0MWIzYmJiMjI2YzFlMDhiYzY3NzVmMWY0MzEwNDlhNDU3NDI0ZGJlMzU3NjJhYmMwYjgwYzZjMDE4NDM4OA== </code></pre> <p>Which has more then double the data</p> <p>Do I have to use a different library for the NodeJS version rather then the build in one? We're hosting our NodeJS backend on Microsoft Azure btw, not sure if this is related but seems at least valid to mention.</p> <p>Edit:</p> <p>I've found the issue, hash_hmac in PHP automatically exports it's data as hexidecimal data, crypto.createHmac exports it's data as raw binary data which I directly converted into base64, all I needed to do was first export the data to hex and then convert that to base64.</p> </div>

关于NodeJS无法执行文件问题

NodeJS安装后,在命令行中执行npm server.js时报以下信息 Usage: npm <command> where <command> is one of: access, adduser, bin, bugs, c, cache, completion, config, ddp, dedupe, deprecate, dist-tag, docs, doctor, edit, explore, get, help, help-search, i, init, install, install-test, it, link, list, ln, login, logout, ls, outdated, owner, pack, ping, prefix, profile, prune, publish, rb, rebuild, repo, restart, root, run, run-script, s, se, search, set, shrinkwrap, star, stars, start, stop, t, team, test, token, tst, un, uninstall, unpublish, unstar, up, update, v, version, view, whoami npm <command> -h quick help on <command> npm -l display full usage info npm help <term> search for help on <term> npm help npm involved overview Specify configs in the ini-formatted file: C:\Users\Administrator\.cnpmrc or on the command line via: npm <command> --key value Config info can be viewed via: npm help config npm@5.5.1 C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm 有哪位大神指导下,怎么操作可以执行JS文件,是什么原因引起的,如何解决

nodejs环境安装出现这个问题npm报错安装nodejs,出现这个npm 报错,问下大佬怎么搞定

![图片说明](https://img-ask.csdn.net/upload/201904/17/1555516705_397884.jpg) 安装nodejs,出现这个npm 报错,问下大佬怎么搞定

Nodejs,Promise使用时在then中返回Promise报错,不明白这样写为什么报错

var wechat = new Wechat() var data = yield wechat('image', __dirname + '\\.5.jpg', false) Wechat.prototype.uploadMaterial = function(type, filePath, isPermanent){ var that = this var url = api.temporary.upload var form = { media: fs.createReadStream(filePath) } that .fetchAccessToken() .then(function(data){ console.log(data) if(!isPermanent){ url += 'access_token=' + data.access_token + '&type=' + type } return new Promise(function(resolve, reject){ request({method:'POST', uri: url, formData: form, json:true}) .then(function(response){ var _data = response.body resolve(_data) }) }) }) } ``` ``` ## 报错信息如下 TypeError: You may only yield a function, promise, generator, array, or object, but the following object was passed: " undefined" at next (H:\study\com\node_modules\co\index.js:101:25) at onFulfilled (H:\study\com\node_modules\co\index.js:69:7) at H:\study\com\node_modules\co\index.js:54:5 at Object.co (H:\study\com\node_modules\co\index.js:50:10) at Object.toPromise (H:\study\com\node_modules\co\index.js:118:63) at next (H:\study\com\node_modules\co\index.js:99:29) at onFulfilled (H:\study\com\node_modules\co\index.js:69:7) at tryCatcher (H:\study\com\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (H:\study\com\node_modules\bluebird\js\release\promise.js:512:31) at Promise._settlePromise (H:\study\com\node_modules\bluebird\js\release\promise.js:569:18) at Promise._settlePromiseCtx (H:\study\com\node_modules\bluebird\js\release\promise.js:606:10) at Async._drainQueue (H:\study\com\node_modules\bluebird\js\release\async.js:138:12) at Async._drainQueues (H:\study\com\node_modules\bluebird\js\release\async.js:143:10) at Immediate.Async.drainQueues (H:\study\com\node_modules\bluebird\js\release\async.js:17:14) at tryOnImmediate (timers.js:639:5) at processImmediate [as _immediateCallback] (timers.js:611:5) ## Nodejs,Promise使用时在then中返回Promise报错,不明白这样写为什么报错,求大神指点谢谢!

关于NodeJS安装之后的问题

NodeJS安装后可以执行命令,但无法执行文件 例如在命令行输入nom server.js执行server.js文件时会出现以下提示: Usage: npm <command> where <command> is one of: access, adduser, bin, bugs, c, cache, completion, config, ddp, dedupe, deprecate, dist-tag, docs, doctor, edit, explore, get, help, help-search, i, init, install, install-test, it, link, list, ln, login, logout, ls, outdated, owner, pack, ping, prefix, profile, prune, publish, rb, rebuild, repo, restart, root, run, run-script, s, se, search, set, shrinkwrap, star, stars, start, stop, t, team, test, token, tst, un, uninstall, unpublish, unstar, up, update, v, version, view, whoami npm <command> -h quick help on <command> npm -l display full usage info npm help <term> search for help on <term> npm help npm involved overview Specify configs in the ini-formatted file: C:\Users\Administrator\.cnpmrc or on the command line via: npm <command> --key value Config info can be viewed via: npm help config npm@5.5.1 C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm 有哪个大神指导,请指点以下,怎么操作可以让他执行JS文件,是因为什么引起的

在node.js环境下,引用<script>报错, Uncaught SyntaxError: Unexpected token <求解!!!!!

# 起服务的代码: ``` var http = require('http'); var fs = require('fs'); var path = require('path') var mime =require('mime'); var cache = {}; //所请求的文件不存在时发送404错误 function send404(response){ response.writeHead(404,{'Conten-Type': 'text/plain'}); response.write('Error 404 : resource not found'); response.end(); } //提供文件数据服务 function sendFile(response,filePath,fileContents){ response.writeHead( 200, { 'Content-Type':mime.getType(path.basename(filePath)) } ); response.end(fileContents); } //判断文件是否被缓存 function serverStatic(response,cache,absPath){ console.log(cache) if(cache[absPath]){ console.log(cache[absPath]); sendFile(response,absPath,cache[absPath]);//从内存中返回文件 }else{ fs.exists(absPath,function(exists){ if(exists){ fs.readFile(absPath,function(err,data){//从硬盘中读取文件 if(err){ send404(response); }else{ cache[absPath] = data; sendFile(response,absPath,data);//从硬盘中读取文件并返回 } }) }else{ send404(response); } }); } } var server = http.createServer(function(req,res){ var filePath = false; var webPage = fs.readFileSync('../html/webpage.html');//同步读取 if(req.url == '/'||req.url=="/favicon.ico"){ filePath = '../js/webpage.js' }else{ filePath = '../'+req.url; } var absPath = filePath;//./static/js/webpage.js console.log(absPath); res.write(webPage); serverStatic(res,cache,absPath); res.end(); }) server.listen('3000',function(err){ if(err){ console.log(err); throw err; } console.log('服务器已开启'); }) ``` # 渲染页面的代码 ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <link rel="stylesheet" type="Content-type:application/x-javascript" href="../css/webpage.css"> </head> <body> <div class="clearfix wrapper"> <p class="storeTitle">商城</p> </div> <script src="../js/webpage.js" type="text/javascript"></script> </body> </html> ``` # 引用的webpage.js代码: ``` var screenheight =window.innerHeight; var wrapper = $('.wrapper'); ``` # 报错信息: ![图片说明](https://img-ask.csdn.net/upload/201903/25/1553478477_238079.png)

vue执行报错Uncaught SyntaxError: Unexpected token < ?

![图片说明](https://img-ask.csdn.net/upload/201904/23/1556010722_288694.png) 为什么会报这样的错?

PHP NodeJS验证

<div class="post-text" itemprop="text"> <p>I would like my PHP based page (directory.domain.com) to use my NodeJS server to authenticate (api.domain.com). I have implemented passportjs on the NodeJS server for authentication. </p> <p>I would like to authenticate the user through the NodeJS server when submitting a login form on directory.domain.com and create a session whereby the user can make post, get, put calls to the api.</p> <p>Is this something that is possible? Is it as simple as creating a ajax request to the api and then setting a token?</p> </div>

NodeJS JQuery文件上传

<div class="post-text" itemprop="text"> <p>I've been working on File Upload in NodeJS and I've been having a hard time with jQuery file upload. I get CORS error thrown at me. I followed this tutorial for File Upload on S3 <a href="https://www.youtube.com/watch?v=Gv0PJrMDBYc&amp;t=649s" rel="nofollow noreferrer">here</a></p> <p>I'm using <code>s3fsImpl</code> <code>s3</code> <code>s3fs</code></p> <p>Here's a my route</p> <pre><code>router.post('/', isAuthenticated, function(req, res, next) { // Check for mandatory form data to be filled // isAuthenticated has an auth-token in the header var auth_token = req.headers['auth-token']; // I believe req.files.file is not getting the file itself if (req.files.file) { var file_name = req.files.file; var stream = fs.createReadStream(file_name.path); if (file_name) { return s3fsImpl.writeFile(file_name.originalFilename, stream).then(function() { fs.unlink(file_name.path, function(err) { if (err) { console.error(err); } else { res.json({"status": 200, "message":"file uploaded"}); // res.end(); } }); }); // callback ends here } } else { res.status(400); res.json({ 'status': 400, 'message': 'bad request, missing fields' }); res.end(); }}); </code></pre> <p>And here's the JQuery Ajax POST</p> <pre><code>$('#uploadAction').click(function() { uploadVal = $('#my-file').val(); var res = $('input[type=file]')[0].files[0].name; console.log(res); var settings = { async: true, crossDomain: true, url: "my_url", method: 'POST', headers: { 'auth-token': 'my_auth_token' }, processData: false, dataType: 'form-data', data: {'file': res}, success: function(data) { $('#statusMsgs').css('background', 'green'); $('#statusMsgs').text('File Successfully Uploaded!'); }, error: function(jqXhr, textStatus, errorThrown) { //var obj = JSON.parse(responseText.responseText); $('#statusMsgs').text(textStatus); } }; $.ajax(settings); }); </code></pre> <p>I've also added </p> <pre><code>app.use(function(req, res, next) { // res.header('Access-Control-Allow-Headers', 'Origin,X-Requested-With,content-type,Authorization,auth-token,Accept'); res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Methods', 'GET,POST'); res.header('Access-Control-Allow-Headers', 'X-Requested-With,content-type,Authorization,auth-token'); next(); }); </code></pre> <p>Here's the HTML part</p> <pre><code> &lt;input type="file" name="my_file" id="my-file" style="border: 1px solid #ccc; padding: 6px;"&gt; &lt;a href="#" id="uploadAction" style="background: #2D86C2; padding: 10px; color: #fff; text-decoration: none;"&gt;Upload&lt;/a&gt; </code></pre> </div>

PHP和NodeJS与mongodb

<div class="post-text" itemprop="text"> <p>I try to save a Steamtrade URL in my mongodb but it doesn't work. If i try to save it, it just disappears and tells me to enter it again. I think there's a problem with one of these parts:</p> <pre><code>$(document).on('click', '.save-link', function() { var link = $('input[rel="get-trade-link"]').val(); var escapedLink = escape(link); if (link.indexOf('https://steamcommunity.com/tradeoffer/new/?partner=') &lt; 0 &amp;&amp; link.indexOf('token') &lt; 0) { $('#error').show('fast').delay(1600).hide('fast'); $('#error').html('&lt;strong&gt;Error: &lt;/strong&gt;Enter Correct Url And Try Again!'); } else { var data = 'link=' + escapedLink; $.ajax({ type: 'POST', url: '/ajax/tradelink.php', cache: false, data: data }); $('#success').show('fast').delay(1600).hide('fast'); $('#success').html('&lt;strong&gt;Link Successfully Saved. &lt;/strong&gt;Dont Forget To Open Inventory To Receive winnings!'); $('.token-block.promo').addClass('hidden'); } }); </code></pre> <p>The tradelink.php is here:</p> <pre><code> &lt;?php session_start(); include ('../steamauth/userInfo.php'); if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) &amp;&amp; !empty($_SERVER['HTTP_X_REQUESTED_WITH']) &amp;&amp; strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { if(!isset($_SESSION['steamid'])) { exit(); } $userLink = $_POST['link']; $userLink = addslashes($_POST['link']); $m = new MongoClient(); $db = $m-&gt;selectDB('admin'); $collection = new MongoCollection($db, 'users'); // search for fruits $fruitQuery = array('steamid' =&gt; $steamprofile['steamid']); $cursor = $collection-&gt;find($fruitQuery); foreach ($cursor as $doc) { $tradeLink = $doc['tradelink']; } if($tradeLink == '') { echo 'No entry found!'; $person = array("steamid" =&gt; $steamprofile['steamid'], "tradelink" =&gt; "".$userLink."" , "type" =&gt; 'trade-link'); $collection-&gt;insert($person); } else { echo 'Record found!'; $obj = $collection-&gt;findOne(); $update = array('tradelink' =&gt; "".$userLink.""); $collection-&gt;update( array( 'steamid' =&gt; $steamprofile['steamid'] ), array( '$set' =&gt; $update ) ); } } ?&gt; </code></pre> </div>

多次安装anaconda后Jupyter启动出现问题

启动jupyter后anaconda报错,报错信息如下: [I 15:34:21.738 NotebookApp] The port 8888 is already in use, trying another port. [I 15:34:21.786 NotebookApp] JupyterLab beta preview extension loaded from C:\Users\10034\Anaconda3\lib\site-packages\jupyterlab [I 15:34:21.786 NotebookApp] JupyterLab application directory is C:\Users\10034\Anaconda3\share\jupyter\lab [W 15:34:21.793 NotebookApp] Error loading server extension jupyterlab Traceback (most recent call last): File "C:\Users\10034\Anaconda3\lib\site-packages\jupyterlab\commands.py", line 321, in __init__ self._run(['node', 'node-version-check.js'], cwd=HERE, quiet=True) File "C:\Users\10034\Anaconda3\lib\site-packages\jupyterlab\commands.py", line 1165, in _run proc = Process(cmd, **kwargs) File "C:\Users\10034\Anaconda3\lib\site-packages\jupyterlab\process.py", line 73, in __init__ self.proc = self._create_process(cwd=cwd, env=env) File "C:\Users\10034\Anaconda3\lib\site-packages\jupyterlab\process.py", line 131, in _create_process cmd[0] = which(cmd[0], kwargs.get('env')) File "C:\Users\10034\Anaconda3\lib\site-packages\jupyterlab\jlpmapp.py", line 59, in which raise ValueError(msg) ValueError: Please install nodejs 5+ and npm before continuing installation. nodejs may be installed using conda or directly from the nodejs website. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\10034\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 1454, in init_server_extensions func(self) File "C:\Users\10034\Anaconda3\lib\site-packages\jupyterlab\extension.py", line 111, in load_jupyter_server_extension info = get_app_info(app_dir) File "C:\Users\10034\Anaconda3\lib\site-packages\jupyterlab\commands.py", line 244, in get_app_info handler = _AppHandler(app_dir, logger) File "C:\Users\10034\Anaconda3\lib\site-packages\jupyterlab\commands.py", line 324, in __init__ raise ValueError(msg) ValueError: Please install nodejs 5+ and npm before continuing installation. nodejs may be installed using conda or directly from the nodejs website. [I 15:34:21.975 NotebookApp] Serving notebooks from local directory: C:\Users\10034 [I 15:34:21.975 NotebookApp] 0 active kernels [I 15:34:21.976 NotebookApp] The Jupyter Notebook is running at: [I 15:34:21.976 NotebookApp] http://localhost:8889/?token=292dce07942e7e31c953a749027b2d327e20ad449cef8ccd [I 15:34:21.976 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 15:34:21.977 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8889/?token=292dce07942e7e31c953a749027b2d327e20ad449cef8ccd [I 15:34:23.630 NotebookApp] Accepting one-time-token-authenticated connection from ::1 我猜应该是我反复安装anaconda导致的问题,请问有大佬帮忙解决吗?

springcloud oauth2.0 jwt 前后端分离的几个问题

oauth2.0提供了一种客户端模式获取token的方式,A微服务就可以用feign通过这种模式请求B服务的相关接口。(zuul,eureka) 第一个问题: 是否有这样一种场景,前端调用A服务的某接口,而这个接口需要调用B服务的某接口,但是这个接口需要用户有一定角色权限才可调用,前端登录的用户是有这种角色权限的,但是由于A服务调用B服务是通过客户端模式生成的token和用户是没关系的,所以会因为没权限调用不了?A服务调用B服务是都通过客户端模式生成token去调用还是会判断前端是否传token,有的话把前端传过来的token继续传过去呢? 第二个问题: 而假设现在不是由前端调用,而是A服务有个定时器,需要调用B服务查询数据的一个接口,而B服务的这个接口是不应该让前端可以调用到。如果正常写接口的话,用户应该还是可以通过zuul到eureka调用到这个接口的吧?这时怎么限制这个不让前端进行调用?修改zuul匹配规则只能请求某路径开头的接口?还是别的怎么方式? 第三个问题: 我github上看了一个基于jwt的前后端分离的oauth2.0的单点登录项目,前端nodejs+vue,然后登录的时候是自定义实现的,用户名+密码+clientid+clientsecret获取token,然后后面可以用refreshtoken + clientid + clientsecret调用接口/oauth/token 续期token。而由于他这里是直接在js里面发起请求到zuul层,所以clientid和clientsecret是直接暴露在js里面的,然后上面说了有一种客户端模式获取token,就是只需要clientid+clientsecret就可以拿到token,只是不能refresh。这样的话把clientid和clientsecret直接写在js里面暴露出来靠谱吗? 而登录已经需要用户名密码了为什么还让传clientid和clientsecret。有什么意义吗?传clientid能理解,clientid有一个scope,但感觉好像没必要也要传clientsecret

nodejs koa2开发微信公众号消息回复ctx.body返回给的xml在在微信端收不到?

服务器端能接受到微信发来的消息,拼好的XMl格式返给微信端时, 微信端收不到,请求大神解决一下,万分感谢 var sha1 = require('sha1'); var Wechat = require('./wechat') var getRawBody = require('raw-body') var util = require('../libs/util') var answer = require('./answer') module.exports = function (opts) { var wechat = new Wechat(opts) return async function(ctx,next){ var token = opts.token; var signature = ctx.query.signature var nonce = ctx.query.nonce var timestamp = ctx.query.timestamp var echostr = ctx.query.ecostr var str = [token,timestamp,nonce].sort().join('') var sha = sha1(str) console.log('+++++'+ctx.method) if(ctx.method === 'GET'){ if(sha ===signature){ ctx.body = ctx.query.echostr }else { ctx.body = 'wrong' } }else if(ctx.method === 'POST'){ if(sha ===signature){ ctx.body = ctx.query.echostr }else { ctx.body = 'wrong' return false } var data = await getRawBody(ctx.req,{ length : ctx.length, limit : '1mb', encoding : ctx.charset }) var content = await util.parseXmlAsync(data) console.log('content+++++'+content+'-------'+content.xml) if(content.xml.MsgType === 'text'){ var now = new Date().getTime() var output=answer.text(content.xml) ctx.body=output; console.log(output) } } } } 控制台输出返回给微信端的XML ![图片说明](https://img-ask.csdn.net/upload/201901/06/1546735671_882248.png) 微信端反应 ![图片说明](https://img-ask.csdn.net/upload/201901/06/1546735727_835874.png)

nodejs npm 和 cnpm 安装的都很成功到最后vue-cli的时候也成功了但出现问题了

![图片说明](https://img-ask.csdn.net/upload/202004/21/1587441343_844050.jpg) 希望大神帮忙解决

oauth2客户端模式权限问题

基于springcloud Finchley.SR2 + springboot2.0.4版本<br/> 在集成oauth2时,因为业务需求需要支持oauth2客户端模式,tokenStore时使用的redistokenStore,但是系统中时根据security中的@PreAuthorize来验证权限的,客户端模式获取token ##问题 1.根据这个token访问系统时,@PreAuthorize把请求拦截了,这个应该如何解决?<br/> 2.在设置tokenStore时,如何动态设置tokenStore是使用redistokenStore还是jwttokenStroe?<br/> 3.oauth_client_details表中的resource_ids字段时在什么情况下起作用,这里边应该存放什么数据?<br/> 待大神指导

NPM 下包的时候报错了,高手帮我看看,谢谢

C:\Users>npm install -g ionic npm ERR! registry error parsing json npm ERR! SyntaxError: Unexpected token < npm ERR! npm ERR! <html><head> npm ERR! <meta http-equiv="content-type" content="text/html;charset=utf-8"> npm ERR! <title>404 Not Found</title> npm ERR! </head> npm ERR! <body text=#000000 bgcolor=#ffffff> npm ERR! <h1>Error: Not Found</h1> npm ERR! <h2>The requested URL <code>/_gh/</code> was not found on this ser npm ERR! <h2></h2> npm ERR! </body></html> npm ERR! npm ERR! at Object.parse (native) npm ERR! at RegClient.<anonymous> (D:\program file\nodejs\node_modules\ est.js:274:23) npm ERR! at Request._callback (D:\program file\nodejs\node_modules\npm\ js:246:65) npm ERR! at Request.self.callback (D:\program file\nodejs\node_modules\ npm ERR! at Request.emit (events.js:98:17) npm ERR! at Request.<anonymous> (D:\program file\nodejs\node_modules\np npm ERR! at Request.emit (events.js:117:20) npm ERR! at IncomingMessage.<anonymous> (D:\program file\nodejs\node_mo 6:12) npm ERR! at IncomingMessage.emit (events.js:117:20) npm ERR! at _stream_readable.js:944:16 npm ERR! If you need help, you may report this *entire* log, npm ERR! including the npm and node versions, at: npm ERR! <http://github.com/npm/npm/issues> npm ERR! System Windows_NT 6.2.9200 npm ERR! command "D:\\program file\\nodejs\\\\node.exe" "D:\\program file\\ install" "-g" "ionic" npm ERR! cwd C:\Users\lvyinxi npm ERR! node -v v0.10.35 npm ERR! npm -v 1.4.28 npm ERR! type unexpected_token npm ERR! npm ERR! Additional logging details can be found in: npm ERR! C:\Users\lvyinxi\npm-debug.log npm ERR! not ok code 0

vuecli3 如何设置maxHeaderSize

问题描述: 请求接口报431,提示token过长导致,于是想通过设置maxHeaderSize来解决 但vuecli3的`npm run serve`是通过webpack-dev-server运行的 而webpack-dev-server看了下源码是通过express来启动的服务,其中有引入nodejs的http模块 于是就想着是否能在http.createServer中进行设置,然并卵 ``` this.listeningApp = http.createServer({maxHeaderSize: 4194304 },this.app); ``` 求解: 如何在vuecli3的dev环境中解决431问题

Composer挂起在NodeJS安装程序上

<div class="post-text" itemprop="text"> <p>Whenever i run composer install,composer runs and at later stages it hangs at : </p> <p>NodeJS installer: - Requested version: *</p> <p>and then keeps stuck there. I have tried everything thats possible.</p> <p>composer clearcache</p> <p>composer diagnose </p> <pre><code>$ composer diagnose Checking composer.json: OK Checking platform settings: OK Checking git settings: OK Checking http connectivity to packagist: OK Checking https connectivity to packagist: OK Checking github.com rate limit: OK Checking disk free space: OK Checking pubkeys: Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642 Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952 OK Checking composer version: OK Composer version: 1.8.5 PHP version: 7.2.10 PHP binary path: C:\xampp-7\php\php.exe </code></pre> <p>composer install -vvv </p> <pre><code>$ composer install -vvv Reading ./composer.json Loading config file C:/Users/TechPulas8/AppData/Roaming/Composer/config.json Loading config file C:/Users/TechPulas8/AppData/Roaming/Composer/auth.json Loading config file ./composer.json Checked CA file C:\xampp-7\apache\bin\curl-ca-bundle.crt: valid Executing command (C:\xampp-7\htdocs\bet): git branch --no-color --no-abbrev -v Executing command (C:\xampp-7\htdocs\bet): git describe --exact-match --tags Executing command (C:\xampp-7\htdocs\bet): git log --pretty="%H" -n1 HEAD Executing command (C:\xampp-7\htdocs\bet): hg branch Executing command (C:\xampp-7\htdocs\bet): fossil branch list Executing command (C:\xampp-7\htdocs\bet): fossil tag list Executing command (C:\xampp-7\htdocs\bet): svn info --xml Reading C:/Users/TechPulas8/AppData/Roaming/Composer/composer.json Loading config file C:/Users/TechPulas8/AppData/Roaming/Composer/config.json Loading config file C:/Users/TechPulas8/AppData/Roaming/Composer/auth.json Loading config file C:/Users/TechPulas8/AppData/Roaming/Composer/composer.json Loading config file C:\Users\TechPulas8\AppData\Roaming\Composer/auth.json Reading C:\Users\TechPulas8\AppData\Roaming\Composer/auth.json Reading C:\xampp-7\htdocs\bet/vendor/composer/installed.json Reading C:/Users/TechPulas8/AppData/Roaming/Composer/vendor/composer/installed.json Loading plugin Hirak\Prestissimo\Plugin Downloading https://repo.packagist.org/packages.json Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/packages.json into cache 1/12: https://repo.packagist.org/p/provider-archived$9b28fc66a61c4c094e992b046c0c43ce756b7d87a0761410e96a4c8c027677e3.json 2/12: https://repo.packagist.org/p/provider-2019-04$3bf0dccaeae8965f903f060263717e4c5a2bbdffbb9323b733b818793b88f7ee.json 3/12: https://repo.packagist.org/p/provider-2018-10$323b4986cd57fbb24c263c57047c5676acc4f0d8a41b0e50d8c35eb682a135f4.json 4/12: https://repo.packagist.org/p/provider-2013$378c7ca13fd05fa0bace79b28c14b249108619a0b7f72db0f884138f629cf0a9.json 5/12: https://repo.packagist.org/p/provider-latest$e9a864e4d3d46a212a523aeab90d2665dc4ccd6bd68e6220764d242724e3e8cc.json 6/12: https://repo.packagist.org/p/provider-2014$b007e1b90339fff3dda3f604dbbdd212fb7b6e34165a19b59dd39e57249ee2c3.json 7/12: https://repo.packagist.org/p/provider-2018-07$4c9a22834f5a448d44b09e2732680a7f5f18530bb536543b91f42d7a8b91db05.json 8/12: https://repo.packagist.org/p/provider-2019-01$9b34d1340279d5c1968a99d44efaf3b85035124a5a41f1bb975156b2bc926d96.json 9/12: https://repo.packagist.org/p/provider-2018$bbe1db4fd86f74d7cfda92e8913ae09d1229e5171aadc1ad0b5a055af9c106ff.json 10/12: https://repo.packagist.org/p/provider-2017$e3cdc263c1edcc5f1b1c016c08b92d6ba83f5660adbcd70a001e9ac70397f706.json 11/12: https://repo.packagist.org/p/provider-2015$8911181ee2448f4c4d208b3f816b910947f9b499aa6ebf269d044843b647e8aa.json 12/12: https://repo.packagist.org/p/provider-2016$a28b0323e15cff09d39091b9d0987c8ad80ebb321f23caf959ac1fa40e6a2579.json Finished: success: 12, skipped: 0, failure: 0, total: 12 Loading plugin Mouf\NodeJsInstaller\NodeJsPlugin Running 1.8.5 (2019-04-09 17:46:47) with PHP 7.2.10 on Windows NT / 6.3 Loading composer repositories with package information Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/packages.json into cache Updating dependencies (including require-dev) Reading C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2013.json from cache Reading C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2014.json from cache Reading C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2015.json from cache Reading C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2016.json from cache Reading C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2017.json from cache Reading C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2018.json from cache Reading C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2018-07.json from cache Reading C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2018-10.json from cache Reading C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2019-01.json from cache Reading C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-2019-04.json from cache Reading C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-archived.json from cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/p-provider-latest.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate$console.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate$http.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate$support.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$var-dumper.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-beyondcode$laravel-dump-server.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate$contracts.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$console.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$process.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate$session.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$http-foundation.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$http-kernel.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine$inflector.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nesbot$carbon.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$polyfill-mbstring.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$polyfill-php72.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-psr$container.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-psr$simple-cache.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$contracts.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$polyfill-php73.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$debug.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate$filesystem.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$finder.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$mime.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$event-dispatcher.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-psr$log.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$polyfill-ctype.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$translation.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$polyfill-intl-idn.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$polyfill-php70.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-paragonie$random-compat.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-dnoegel$php-xdg-base-dir.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine$instantiator.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine$lexer.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-dragonmantank$cron-expression.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-egulias$email-validator.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-erusev$parsedown.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-fideloper$proxy.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-filp$whoops.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-fzaninotto$faker.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-guzzlehttp$promises.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-guzzlehttp$psr7.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-guzzlehttp$guzzle.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-psr$http-message.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-ralouphie$getallheaders.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-hamcrest$hamcrest-php.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-jakub-onderka$php-console-color.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-jakub-onderka$php-console-highlighter.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-league$flysystem.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-monolog$monolog.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-opis$closure.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-ramsey$uuid.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-swiftmailer$swiftmailer.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$routing.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-tijsverkoyen$css-to-inline-styles.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-vlucas$phpdotenv.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-laravel$framework.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpstan$phpstan.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$polyfill-iconv.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$css-selector.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpoption$phpoption.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-composer$xdebug-handler.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-jean85$pretty-package-versions.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette$bootstrap.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette$di.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette$robot-loader.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette$utils.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nikic$php-parser.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpstan$phpdoc-parser.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-ocramius$package-versions.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette$neon.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette$php-generator.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette$schema.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette$finder.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-league$oauth1-client.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-laravel$socialite.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-guzzle$guzzle.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$polyfill-php54.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$polyfill-php55.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-ircmaxell$password-compat.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-psy$psysh.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-laravel$tinker.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-danielstjules$stringy.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate$auth.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate$database.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-mateusjunges$laravel-acl.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate$queue.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate$container.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-mockery$mockery.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-myclabs$deep-copy.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nunomaduro$collision.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phar-io$version.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phar-io$manifest.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpdocumentor$reflection-common.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpdocumentor$type-resolver.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-webmozart$assert.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpdocumentor$reflection-docblock.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian$comparator.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian$recursion-context.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpspec$prophecy.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-dflydev$markdown.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian$diff.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian$exporter.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpunit$php-file-iterator.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpunit$php-text-template.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpunit$php-token-stream.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian$code-unit-reverse-lookup.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian$environment.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian$version.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-theseer$tokenizer.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpunit$php-code-coverage.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpunit$php-timer.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian$global-state.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian$object-enumerator.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian$resource-operations.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpunit$phpunit.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian$object-reflector.json into cache Writing C:/Users/TechPulas8/AppData/Local/Composer/repo/https---repo.packagist.org/provider-laravel$laravel.json into cache Resolving dependencies through SAT Looking at all rules. Something's changed, looking at all rules again (pass #3) Dependency resolution completed in 2.749 seconds Analyzed 15262 packages to resolve dependencies Analyzed 516708 rules to resolve dependencies Nothing to install or update Resolving dependencies through SAT Looking at all rules. Dependency resolution completed in 0.001 seconds Reading C:\xampp-7\htdocs\bet/vendor/composer/installed.json Writing lock file Generating optimized autoload files &gt; post-autoload-dump: Illuminate\Foundation\ComposerScripts::postAutoloadDump &gt; post-autoload-dump: @php artisan package:discover --ansi Executing command (CWD): "C:\xampp-7\php\php.exe" -d allow_url_fopen="1" -d disable_functions="" -d memory_limit="1536M" artisan package:discover --ansi Discovered Package: beyondcode/laravel-dump-server Discovered Package: fideloper/proxy Discovered Package: laravel/socialite Discovered Package: laravel/tinker Discovered Package: mateusjunges/laravel-acl Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision Package manifest generated successfully. NodeJS installer: - Requested version: * </code></pre> <p>It should move ahead of the "Requested Version *" , but it never does.</p> </div>

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

Linux 会成为主流桌面操作系统吗?

整理 |屠敏出品 | CSDN(ID:CSDNnews)2020 年 1 月 14 日,微软正式停止了 Windows 7 系统的扩展支持,这意味着服役十年的 Windows 7,属于...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

学习总结之HTML5剑指前端(建议收藏,图文并茂)

前言学习《HTML5与CSS3权威指南》这本书很不错,学完之后我颇有感触,觉得web的世界开明了许多。这本书是需要有一定基础的web前端开发工程师。这本书主要学习HTML5和css3,看...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

记一次腾讯面试,我挂在了最熟悉不过的队列上……

腾讯后台面试,面试官问:如何自己实现队列?

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

冒泡排序动画(基于python pygame实现)

本项目效果初始截图如下 动画见本人b站投稿:https://www.bilibili.com/video/av95491382 本项目对应github地址:https://github.com/BigShuang python版本:3.6,pygame版本:1.9.3。(python版本一致应该就没什么问题) 样例gif如下 ======================= 大爽歌作,mad

Redis核心原理与应用实践

Redis核心原理与应用实践 在很多场景下都会使用Redis,但是到了深层次的时候就了解的不是那么深刻,以至于在面试的时候经常会遇到卡壳的现象,学习知识要做到系统和深入,不要把Redis想象的过于复杂,和Mysql一样,是个读取数据的软件。 有一个理解是Redis是key value缓存服务器,更多的优点在于对value的操作更加丰富。 安装 yum install redis #yum安装 b...

现代的 “Hello, World”,可不仅仅是几行代码而已

作者 |Charles R. Martin译者 | 弯月,责编 | 夕颜头图 |付费下载自视觉中国出品 | CSDN(ID:CSDNnews)新手...

带了6个月的徒弟当了面试官,而身为高级工程师的我天天修Bug......

即将毕业的应届毕业生一枚,现在只拿到了两家offer,但最近听到一些消息,其中一个offer,我这个组据说客户很少,很有可能整组被裁掉。 想问大家: 如果我刚入职这个组就被裁了怎么办呢? 大家都是什么时候知道自己要被裁了的? 面试软技能指导: BQ/Project/Resume 试听内容: 除了刷题,还有哪些技能是拿到offer不可或缺的要素 如何提升面试软实力:简历, 行为面试,沟通能...

!大部分程序员只会写3年代码

如果世界上都是这种不思进取的软件公司,那别说大部分程序员只会写 3 年代码,恐怕就没有程序员这种职业。

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

HTTP与HTTPS的区别

面试官问HTTP与HTTPS的区别,我这样回答让他竖起大拇指!

程序员毕业去大公司好还是小公司好?

虽然大公司并不是人人都能进,但我仍建议还未毕业的同学,尽力地通过校招向大公司挤,但凡挤进去,你这一生会容易很多。 大公司哪里好?没能进大公司怎么办?答案都在这里了,记得帮我点赞哦。 目录: 技术氛围 内部晋升与跳槽 啥也没学会,公司倒闭了? 不同的人脉圈,注定会有不同的结果 没能去大厂怎么办? 一、技术氛围 纵观整个程序员技术领域,哪个在行业有所名气的大牛,不是在大厂? 而且众所...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

立即提问
相关内容推荐