运行环境是 Node12,如何知道用 npm 安装依赖库时应该指定哪个版本号?
source link: https://www.v2ex.com/t/908873
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
我对 node 不是很熟悉,微信小程序的云函数运行在 node12.16 上,但是我的开发电脑是 M1 的 Macbook ,本地安装的是 node16.
我发现,如果我用 npm 安装依赖库时不指定版本号,可能会出现在本地( node16 )正常运行,但上传到云环境(node12.16)后不能正常运行的情况。
我也想过在本地安装一个 node12 ,但发现在 M1 芯片的 Mac 上安装 node12 很麻烦。
所以,我想的是如果用 npm install 依赖库的时候,指定适合 node12.16 这个环境的版本号是不是可以解决问题?
或者,有没有其他更好的办法? 谢谢,我最近刚学用 node ,不是很了解。
Recommend
-
138
你需要知道的几类npm依赖包管理 2017年10月03日 00:35 · 阅读 7672
-
6
《Flask Web 开发实战》虚拟环境/依赖/Pipenv 等问题解决方法 1条回复 注:这篇文章的主要受众是《Flask...
-
8
PyCon China 2019:Python 虚拟环境和依赖管理工具大乱斗 发表回复 这是在 PyCon China 2019 上海场 9 月 21...
-
4
WPF 如何知道当前有多少个 DispatcherTime 在运行在 WPF 调试中,对于 DispatcherTimer 定时器的执行,没有直观的调试方法。本文来告诉大家如何在 WPF 中调试当前主线程有多少个 DispatcherTimer 在运行 在 WPF 中,如果有 DispatcherTimer...
-
5
WPF 如何知道当前有多少个 DispatcherTimer 在运行在 WPF 调试中,对于 DispatcherTimer 定时器的执行,没有直观的调试方法。本文来告诉大家如何在 WPF 中调试当前主线程有多少个 DispatcherTimer 在运行 在 WPF 中,如果有 DispatcherTimer...
-
3
一文读懂云函数 SCF 如何进行依赖安装(下)发布于: 2021-7-21归档于: 最佳实践标签:
-
5
生产环境下如何优雅地使用 Docker 运行宝塔面板?发布于 今天 14:34 <p>此方案可能是全网最快的 宝塔面板 部署方案。 复习计算机网络时轻度折腾了 Linux、Doc...
-
8
如果要运行一个Express服务,就必须要安装一个Node环境,本篇文章就来讲讲如何在Centos7下安装Node环境。 安装Node 其实安装Node环境很简单,我们通过 yum 工具就可以安装 安装EPEL EPEL(Extra Packages for Enterprise Linux...
-
7
maven项目打jar包包含所有依赖运行相应主类程序
-
8
创建镜像发布到镜像仓库【不依赖docker环境】 - 俞正东 - 博客园 ima...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK