微信小程序不支持直接读取node_modules
首先在目录文件夹下cmd输入npm init命令
D:\小程序\project\calendar\calendar_1>npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help init` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
version: (1.0.0)
description:
entry point: (app.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to D:\小程序\project\calendar\calendar_1\package.json:
{
"name": "calendar_1",
"version": "1.0.0",
"description": "",
"main": "app.js",
"dependencies": {
"accepts": "^1.3.8",
"agentkeepalive": "^4.5.0",
"ajv": "^6.12.6",
"arg": "^4.1.3",
"array-flatten": "^1.1.1",
"asn1": "^0.2.6",
"assert-plus": "^1.0.0",

文章介绍了在微信小程序项目中如何使用npm初始化并管理node_modules依赖包,包括`npminit`命令的执行和`npminstall`的使用过程。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



