第一步 npm install --production 第二步点击小程序的工具 -> 构建npm 这时会提示 没有找到 node_modules 目录 这时 进入根目录打开控制台 输入 npm init 然后连续回车 再试试第二步的操作,即可。