使用Visual Studio Code进行前端开发并运行前端页面时提示如下错误:

npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vuedatabase@1.0.0 dev: `webpack-dev-server --inline --progress --config build/
onf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vuedatabase@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging ou
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

原因是因为没有npm install 生成node_modules目录

解决办法:执行命令:npm install或npm install --registry=https://registry.npm.taobao.org,再重新执行npm run dev即可运行。

具体步骤如下:
指定到当前目录,安装依赖:

npm install

runnpm audit fixto fix them, ornpm auditfor details

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":
"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1253 packages from 715 contributors and audited 11236 packages in 50.262s
found 308 vulnerabilities (1 low, 9 moderate, 298 high)
run `npm audit fix` to fix them, or `npm audit` for details
指定到当前目录:

npm audit fix --force

'proxy' config is set properly. See: 'npm help config'

清除npm缓存。

npm cache clean --force

原文链接:

1、npm WARN Local package.json exists, but node_modules missing, did you mean to install?

2、解决【npm ERR! Unexpected end of JSON input while parsing near '...sh_time":141072930277'】方案

使用Visual Studio Code进行前端开发并运行前端页面时提示:npm WARN Local package.json exists, but node_modules missing, did you mean to install?的更多相关文章

  1. 使用Visual Studio Code搭建TypeScript开发环境

    使用Visual Studio Code搭建TypeScript开发环境 1.TypeScript是干什么的 ? TypeScript是由微软Anders Hejlsberg(安德斯·海尔斯伯格,也是 ...

  2. Visual Studio Code和Docker开发asp.net core和mysql应用

    Visual Studio Code和Docker开发asp.net core和mysql应用 .net猿遇到了小鲸鱼,觉得越来越兴奋.本来.net猿只是在透过家里那田子窗看外面的世界,但是看着海峡对 ...

  3. 新成员!Visual Studio Code --跨平台的开发工具(支持OSX, Linux 和 Windows)

    原文出处:新成员!Visual Studio Code --跨平台的开发工具(支持OSX, Linux 和 Windows) 这是我的文章备份  http://www.dotblogs.com.tw/ ...

  4. Windows下visual studio code搭建golang开发环境

    Windows下visual studio code搭建golang开发环境 序幕 其实环境搭建没什么难的,但是遇到一些问题,主要是有些网站资源访问不了(如:golang.org),导致一些包无法安装 ...

  5. Visual Studio Code配置 HTML 开发环境

    Visual Studio Code配置 HTML 开发环境 https://v.qq.com/x/page/l0532svf47c.html?spm=a2h0k.11417342.searchres ...

  6. Visual Studio Code配置GoLang开发环境

    Visual Studio Code配置GoLang开发环境 在Visual Studio Code配置GoLang开发环境 作者:chszs,未经博主允许不得转载.经许可的转载需注明作者和博客主页: ...

  7. Visual Studio Code 做PHP开发

    Visual Studio Code 做PHP开发 1. 在Windows 10环境下安装PHP: 1. 下载自己中意的PHP版本:http://windows.php.net/download (我 ...

  8. 使用 Visual Studio Code 进行远程开发

    使用 Visual Studio Code 进行远程开发 在完成了 AT 指令入门的学习之后,接下来就要使用 AT 指令进行 Socket 通信了.问题在于,之前 .NET 的 Socket 编程只需 ...

  9. docker4dotnet #3 在macOS上使用Visual Studio Code和Docker开发asp.net core和mysql应用

    .net猿遇到了小鲸鱼,觉得越来越兴奋.本来.net猿只是在透过家里那田子窗看外面的世界,但是看着海峡对岸的苹果园越来越茂盛,实在不想再去做一只宅猿了.于是,.net猿决定搭上小鲸鱼的渡轮到苹果园去看 ...

  10. Visual Studio Code作为Angular开发工具常用插件安装、json-server安装与使用、angular/cli安装失败问题

    前提准备: 搭建好Angular开发环境 1 安装Visual Studio Code 教程简单,不会的去问度娘 2 安装Chrome浏览器 教程简单,不会的趣闻度娘 3 Visual Studio ...

随机推荐

  1. Kubernetes 跨 StorageClass 迁移 Persistent Volumes 完全指南

    大家好,我是米开朗基杨. KubeSphere 3.3.0 (不出意外的话~)本周就要 GA 了,作为一名 KubeSphere 脑残粉,我迫不及待地先安装 RC 版尝尝鲜,一顿操作猛如虎开启所有组件 ...

  2. 多个modal遮罩层覆盖不全的问题

    多个modal遮罩层覆盖不全的问题 如下有两个 modal的情况,要解决的是 在delete操作时弹出的modal 周围没有遮罩层环绕使得 确认 modal 辨识度不高 的问题 这里是修改好了的效果 ...

  3. mse~路由实现某个页面的灰度功能

    起因 我有个网站A[蓝色服务],要对网站A进行改版[绿色服务],其中用户中心已经改完了,希望当用户访问时,如果http请求头中包含isGroup,并且isGroup=0时,去新的绿色服务,反之就还是去 ...

  4. Redis性能优化的18招

    前言 Redis在我们的日常开发工作中,使用频率非常高,已经变成了必不可少的技术之一. Redis的使用场景也很多. 比如:保存用户登录态,做限流,做分布式锁,做缓存提升数据访问速度等等. 那么问题来 ...

  5. 【一步步开发AI运动小程序】三、运动识别处理流程

    随着人工智能技术的不断发展,阿里体育等IT大厂,推出的"乐动力"."天天跳绳"AI运动APP,让云上运动会.线上运动会.健身打卡.AI体育指导等概念空前火热.那 ...

  6. excel/xlsx 空值判断NaN

    从numpy导入nan类型,以此判断NaN类型

  7. (Python基础教程之二)在Sublime Editor中配置Python环境

    Python基础教程 在SublimeEditor中配置Python环境 Python代码中添加注释 Python中的变量的使用 Python中的数据类型 Python中的关键字 Python字符串操 ...

  8. Personal Wiki

    What is a PersonalWiki? It's like WardsWiki, but it's yours. It can be: a free-form database a Perso ...

  9. Windows系统下PhpStorm+Xdebug安装与调试

    环境说明: 系统:Windows10 PhpStorm:2019.3.2 PHP版本:7.3.21 Xdebug版本 :2.7.2 一.Xdebug介绍 官网地址:https://xdebug.org ...

  10. Linx操作Nginx命令

    在 CentOS 上操作 Nginx 包括安装.启动.停止.重新加载配置等.以下是在 CentOS 上操作 Nginx 的常用命令: 安装 Nginx: sudo yum install nginx ...