且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

发布并安装globaly后找不到节点npm包throw use strict:命令

更新时间:2023-11-18 18:05:10

您的脚本应以 shebang 开始>行,否则它将作为shell脚本执行(因此会出现错误).

Your script should start with a shebang line, otherwise it will be executed as a shell script (hence the errors).

将此作为第一行添加到 dist/myPack.js :

Add this as first line to dist/myPack.js:

#!/usr/bin/env node