node.js - 我在安装 npm 时遇到问题,并且损坏了所有内容
问题描述
再次向整个社区问好,我在多次删除 package.json 和 node_modules 后尝试在我的项目中重新安装 npm,但它对我没有任何作用。当我npm install
从字面上什么都没有发生时,但是当我这样做npm run dev
时会引发以下错误:
tom@tom-CR62-7ML:/var/www/html/Proyectos/clinic$ npm run dev
> @ dev /var/www/html/Proyectos/clinic
> npm run development
> @ development /var/www/html/Proyectos/clinic
> mix
sh: 1: mix: not found
npm ERR! Linux 4.15.0-135-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "development"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ development: `mix`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ development script 'mix'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! mix
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/Proyectos/clinic/npm-debug.log
npm ERR! Linux 4.15.0-135-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script 'npm run development'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run development
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/Proyectos/clinic/npm-debug.log
如果任何专家可以在这个问题上帮助我,我将不胜感激,因为我已经处理了几个小时。谢谢!
我添加我的 package.json 文件
{
"name": "clinic",
"version": "1.0.0",
"description": "<p align=\"center\"><a href=\"https://laravel.com\" target=\"_blank\"><img src=\"https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg\" width=\"400\"></a></p>",
"main": "webpack.mix.js",
"directories": {
"test": "tests"
},
"scripts": {
"test": "dev"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Code1995Tom/clinic.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/Code1995Tom/clinic/issues"
},
"homepage": "https://github.com/Code1995Tom/clinic#readme"
}
解决方案
推荐阅读
- spring-boot - Spring REST:仅当请求者是朋友时才显示用户的某些数据
- office-js - Excel自定义功能:TypeError:Windows桌面上的网络请求失败,在线和mac(桌面和在线)
- javascript - 替换文件名的坏字符
- reactjs - 如何使 ListItem 拆分为多个列 React.js
- c# - LINQ,按属性分组,同时保持其他属性排序
- android - 膨胀类 androidx.constraintlayout.widget.ConstraintLayout 的运行时错误
- javascript - 找不到本地主机 socket.io 服务器 (404)
- visual-studio - 使用 .NET Framework 发布时如何复制 webpack 构建
- python - Python - Pandas - 查找两个数据帧之间的匹配项
- python - 如何将产品 3d numpy 数组行点成另一个 3d 数组行并获得 3d 数组?