[英]How to install npm modules for nuxt.js on server without internet connection
I'am developing a universal app with nuxt js.我正在使用 nuxt js 开发一个通用应用程序。 Apperently the server does not have a network connection to the internet.
显然,服务器没有到互联网的网络连接。 Is is possible to build the application with all it's depedencies or manual install the dependecies?
是否可以使用所有依赖项或手动安装依赖项来构建应用程序?
Best regards,此致,
Ian伊恩
In general for Node.js, unless native extensions are used, you can just install Node.js on the target server, then copy over your node_modules
directory.通常对于 Node.js,除非使用本机扩展,否则您只需在目标服务器上安装 Node.js,然后复制您的
node_modules
目录。
If there are native extensions, get your hands on an internet-connected machine with a similar architecture (OS and processor) and Node.js version as your deployment target, run npm i
/ yarn
there and copy over that node_modules
directory.如果有本机扩展,请使用具有类似架构(操作系统和处理器)和 Node.js 版本的联网机器作为部署目标,在那里运行
npm i
/ yarn
并复制该node_modules
目录。
I haven't used Nuxt.js, though, so YMMV there.不过,我没有使用过 Nuxt.js,所以 YMMV 在那里。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.