[英]JScript compilation error nodejs command line tool
So I'm trying to build a command line tool using node.js
but am running into problems trying to run the tool. 因此,我正在尝试使用
node.js
构建命令行工具,但在尝试运行该工具时遇到了问题。 Here's the simple code that I have. 这是我的简单代码。
src/main.js SRC / main.js
#!/usr/bin/env node
'use strict';
(function main() {
console.log('Hello World!');
})();
and in my packages.json
I have this added 在我的
packages.json
添加了这个
"bin": {
"test": "./src/main.js"
}
But when I try and execute test
from the command line I get a Microsoft JScript compilation error at line 1 char 1 invalid character code 800A03F6. 但是,当我尝试从命令行执行
test
,在第1行char 1无效字符代码800A03F6处收到Microsoft JScript编译错误。
Any ideas what I might be missing? 有什么想法可能会丢失吗? Thanks :)
谢谢 :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.