简体   繁体   English

如何在不使用npm install的情况下使用nodemon

[英]How can I use nodemon without using npm install

My network doesn't allowed using npm install . 我的网络不允许使用npm install How can I install and use nodemon? 如何安装和使用nodemon? Node run only after set PATH variables on windows I tried set the path for nodemon, but I dont have results. 节点在Windows上设置PATH变量后才运行我尝试设置nodemon的路径,但我没有结果。

The easiest way to install an npm package is going to be to either tunnel out of your network with a proxy, or to simply install the package while you're on a different network. 安装npm软件包的最简单方法是使用代理隧道离开网络,或者只是在不同的网络上安装软件包。 The reason it's not as simple to just download it is that npm packages have a list of dependencies that need to be installed along with it. 下载它并不简单的原因是npm软件包有一个需要随之安装的依赖项列表。 Npm takes care of installing the dependency graph for you. Npm负责为您安装依赖图。 If you try to install it manually you would have to manually go over nodemon's package.json file and install all of its dependencies. 如果您尝试手动安装它,则必须手动检查nodemon的package.json文件并安装其所有依赖项。 That might not be so bad until you realize that you then have to go through all those dependencies and install their dependencies, and so on... 这可能不会那么糟糕,直到你意识到你必须经历所有这些依赖关系并安装它们的依赖关系,等等......

I'm not at all affiliated with IPVanish but I recently signed up for their service for the same reason as you. 我与IPVanish完全没有联系,但最近我出于同样的原因报名参加了他们的服务。 My computer has a VPN configured that connects to an IPVanish server and then my computer tunnels all internet traffic through that VPN. 我的计算机配置了一个连接到IPVanish服务器的VPN,然后我的计算机通过该VPN隧道传输所有互联网流量。 It's nice for simple anonymous web browsing, but more importantly there is no way for network admins here to see where any of my traffic is going. 对于简单的匿名网页浏览来说这很好,但更重要的是,这里的网络管理员无法查看我的任何流量。 To them it appears that I'm just talking to a random server. 对他们来说,似乎我只是在跟随机服务器说话。 They'd have to block every single IPVanish server (and there's a lot!). 他们必须阻止每一个IPVanish服务器(并且有很多!)。

There are other alternatives but that one had good reviews and it's only $10 a month. 还有其他选择,但其中一个有很好的评论,每月只需10美元。 I haven't tried any others but I'm sure they're just as good. 我没有尝试过任何其他人,但我确信他们一样好。


If tunneling out of your network or installing the module on a different network isn't an option, I'm happy to install it myself and upload a zip of the completed install to Google Drive so you can just extract it to the global npm folder. 如果无法通过网络进行隧道传输或在其他网络上安装模块,我很乐意自行安装并将已完成安装的压缩文件上传到Google云端硬盘,以便您可以将其解压缩到全局npm文件夹。 However, that would obviously not be a permanent solution for you and even though I have good intentions, you don't know me and I don't recommend downloading random stuff off of a stranger's Google Drive. 然而,这对你来说显然不是一个永久的解决方案,即使我有良好的意图,你也不了解我,我不建议从陌生人的谷歌硬盘上下载随机的东西。

I recommend getting a friend to do the following from another network: 我建议朋友从另一个网络执行以下操作:

  1. Install nodemon: npm install -g nodemon 安装nodemon: npm install -g nodemon
  2. Find where global npm modules install to: npm config get prefix 查找全局npm模块安装到的位置: npm config get prefix
  3. Navigate to the global npm module path, find the nodemon directory, and zip it up. 导航到全局npm模块路径,找到nodemon目录,然后将其压缩。
  4. Email/Dropbox you the archived module. 电子邮件/ Dropbox归档模块。
  5. On your machine figure out where global npm modules install to: npm config get prefix 在你的机器上找出全局npm模块安装到的位置: npm config get prefix
  6. Extract the nodemon zip to that location. 将nodemon zip解压缩到该位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM