设置engines似乎没什么用?
不设置这个似乎也没什么影响?
所以这参数到底干嘛的。。。
正在回答 回答被采纳积分+1
> https://docs.npmjs.com/cli/v9/configuring-npm/package-json#engines
You can specify(指定) the version of node that your stuff works on:
```json
{
"engines": {
"node": ">=0.10.3 <15"
}
}
```
And, like with dependencies, if you don't specify(指定) the version (or if you specify(指定) "*" as the version), then any version of node will do.
You can also use the "engines" field to specify(指定) which versions of npm are capable of properly installing your program. For example:
```json
{
"engines": {
"npm": "~1.0.20"
}
}
```
Unless the user has set the [`engine-strict` config](https://docs.npmjs.com/cli/v9/using-npm/config#engine-strict) flag,
this field is advisory only and will only produce <font color='orange'>warnings</font> when your package is installed as a dependency.
- 参与学习 303 人
- 解答问题 391 个
全新打造“技术成长&职业破局”双高体系,深度打通“全栈 + 全流程 +多端+ 提效+AI赋能”,递进式锤炼思维与高阶技能,高效实现能力跃迁,助力成为“驾驭全局,深广兼备,打通多端全栈”的高级工程师
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星