admin管理员组文章数量:1026134
I've followed this tutorial for Rabbitmq in Javascript. These are the codes: .js
.js
But, when I try to run them with ./send.js and/or ./recv.js it gives me "Permission denied" error.
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? :/
I've followed this tutorial for Rabbitmq in Javascript. These are the codes: https://github./rabbitmq/rabbitmq-tutorials/blob/master/javascript-nodejs/src/send.js
https://github./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.
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? :/
Share Improve this question asked Jan 24, 2017 at 11:18 SaraSara 571 silver badge5 bronze badges 1- Possible duplicate of Is it possible to run JavaScript files from the mand line? – Thomas Commented Feb 4, 2018 at 22:01
2 Answers
Reset to default 3Well, i think you are wrong with few things... you are trying to run it without node or an interpreter.
- If a file it's not a module like file, you should use
node ./file.js
- If a file it's a module you must to use something like this
var myModule = require('./myModule.js);
and use its functions. - If a file it's a browser script you should use like this
<script src="/file.js"></script>
and use its functions.
I don't know that software and how it works, but that are the essentials usages of mon javascript files.
You're trying to run Javascript from the mand line. This answer details how to do it with Node, with instructions from Command Line Javascript. Here's a quick rundown:
- Download and install Node
- Create the file hello.js containing just one line:
console.log('Hello, world');
- Running your program is easy; invoke node on the file containing your program:
node hello.js
I've followed this tutorial for Rabbitmq in Javascript. These are the codes: .js
.js
But, when I try to run them with ./send.js and/or ./recv.js it gives me "Permission denied" error.
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? :/
I've followed this tutorial for Rabbitmq in Javascript. These are the codes: https://github./rabbitmq/rabbitmq-tutorials/blob/master/javascript-nodejs/src/send.js
https://github./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.
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? :/
Share Improve this question asked Jan 24, 2017 at 11:18 SaraSara 571 silver badge5 bronze badges 1- Possible duplicate of Is it possible to run JavaScript files from the mand line? – Thomas Commented Feb 4, 2018 at 22:01
2 Answers
Reset to default 3Well, i think you are wrong with few things... you are trying to run it without node or an interpreter.
- If a file it's not a module like file, you should use
node ./file.js
- If a file it's a module you must to use something like this
var myModule = require('./myModule.js);
and use its functions. - If a file it's a browser script you should use like this
<script src="/file.js"></script>
and use its functions.
I don't know that software and how it works, but that are the essentials usages of mon javascript files.
You're trying to run Javascript from the mand line. This answer details how to do it with Node, with instructions from Command Line Javascript. Here's a quick rundown:
- Download and install Node
- Create the file hello.js containing just one line:
console.log('Hello, world');
- Running your program is easy; invoke node on the file containing your program:
node hello.js
本文标签: Javascript permission deniedStack Overflow
版权声明:本文标题:Javascript: permission denied - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745633319a2160294.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论