[英]Javascript: permission denied
I've followed this tutorial for Rabbitmq in Javascript. 我已经使用Javascript遵循了Rabbitmq的本教程。 These are the codes: https://github.com/rabbitmq/rabbitmq-tutorials/blob/master/javascript-nodejs/src/send.js
这些是代码: https : //github.com/rabbitmq/rabbitmq-tutorials/blob/master/javascript-nodejs/src/send.js
https://github.com/rabbitmq/rabbitmq-tutorials/blob/master/javascript-nodejs/src/receive.js https://github.com/rabbitmq/rabbitmq-tutorials/blob/master/javascript-nodejs/src/receive.js
But, when I try to run them with ./send.js and/or ./recv.js it gives me "Permission denied" error. 但是,当我尝试使用./send.js和/或./recv.js运行它们时, 出现 “权限被拒绝”错误。
I look for some solutions but I don't understand, or I find something about IE (that it's not my case) - plus I don't think the problem is the browser (?) If it's so... why? 我正在寻找一些解决方案,但我不明白,或者我发现了有关IE的某些信息(不是我的情况)-再加上我不认为问题出在浏览器(?),如果这样,为什么?为什么? :/
:/
Well, i think you are wrong with few things... you are trying to run it without node or an interpreter. 好吧,我认为您在几件事上是错的...您正在尝试在没有节点或解释器的情况下运行它。
node ./file.js
node ./file.js
var myModule = require('./myModule.js);
var myModule = require('./myModule.js);
and use its functions. <script src="/file.js"></script>
and use its functions. <script src="/file.js"></script>
并使用其功能。 I don't know that software and how it works, but that are the essentials usages of common javascript files. 我不知道该软件及其运行方式,但这是常见javascript文件的基本用法。
You're trying to run Javascript from the command line. 您正在尝试从命令行运行Javascript。 This answer details how to do it with Node, with instructions from Command Line Javascript .
该答案详细说明了如何使用Node以及命令行Javascript中的说明进行操作。 Here's a quick rundown:
这是一个简短的摘要:
console.log('Hello, world');
node hello.js
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.