写的app.js里有中文:
console.log('现在的并发数是', concurrencyCount, ',正在抓取的是', url, ',耗时' + delay + '毫秒');
一运行,就报错:
上网搜了一下,说是系统编码的问题。
重新打开cmd,输入chcp 936。然后重新运行程序即可。
solution:
I have just been playing with Unicode support in Windows command prompt, using the code-page 65001 I can't get npm to install, giving me the above error. Changing the code-page to 850 chcp 850
and running the exact same npm command it then works fine.
Thus your problem could very well be related to the encoding your environment is in.