运行帆抛出无效字符错误 [英] Running sails throwing invalid character error

查看:36
本文介绍了运行帆抛出无效字符错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 npm install Sails -g 成功安装了风帆我正在运行 Windows 7.当我尝试运行sails"命令时,出现找不到命令"的错误消息.然后我在 PATH env 变量中包含了相应的 bin 文件夹.然后在尝试运行 'sails' 命令时出现 javascript 错误.错误::

I have installed sails successfully using npm install sails -g I am running Windows 7. When I tried to run the 'sails' command, got error saying "command not found". Then I included the corresponding bin folder in PATH env variable. Then getting javascript error while trying to run 'sails' command. ERROR::

行:1

字符:1

错误:无效字符

代码:800A03F6

Code: 800A03F6

来源:Microsoft JScript 编译错误

Source: Microsoft JScript compilation error

推荐答案

此错误消息未链接到 Node,而是链接到 Windows Scripting Host.

This error message is not linked to Node, but to Windows Scripting Host.

在 Windows 上,.js 文件默认关联到 Windows Scripting Host,因此脚本不会与 Node 一起运行.

On Windows .js files are associated to Windows Scripting Host by default, so the script will not be run with Node.

打开文件浏览器,找到一个 JavaScript 文件,您可以通过图标检查它不是 JavaScript.

Open a file explorer and find a JavaScript file, you can check by the icon that it's not considered JavaScript.

打开 JavaScript 文件的属性,然后在关联程序(或打开方式)中,链接 Node.js exe 文件以打开此类文件.

Open a JavaScript file's properties and in the associated programs (or open with), link the Node.js exe file to open that kind of files.

该错误不应再出现.

这篇关于运行帆抛出无效字符错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆