weixin_40860694 2017-11-16 02:32 采纳率: 0%
浏览 2640

关于NodeJS安装之后的问题

NodeJS安装后可以执行命令,但无法执行文件
例如在命令行输入nom server.js执行server.js文件时会出现以下提示:
Usage: npm

where is one of:
access, adduser, bin, bugs, c, cache, completion, config,
ddp, dedupe, deprecate, dist-tag, docs, doctor, edit,
explore, get, help, help-search, i, init, install,
install-test, it, link, list, ln, login, logout, ls,
outdated, owner, pack, ping, prefix, profile, prune,
publish, rb, rebuild, repo, restart, root, run, run-script,
s, se, search, set, shrinkwrap, star, stars, start, stop, t,
team, test, token, tst, un, uninstall, unpublish, unstar,
up, update, v, version, view, whoami

npm -h quick help on
npm -l display full usage info
npm help search for help on
npm help npm involved overview

Specify configs in the ini-formatted file:
C:\Users\Administrator.cnpmrc
or on the command line via: npm --key value
Config info can be viewed via: npm help config

npm@5.5.1 C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm
有哪个大神指导,请指点以下,怎么操作可以让他执行JS文件,是因为什么引起的

  • 写回答

1条回答

  • gejingpei 2017-11-16 02:49
    关注

    命令输错了,应该是node server.js

    评论

报告相同问题?

悬赏问题

  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏