node_modules/.bin/vue-cli-service: Permission denied

背景

因为有一些前端依赖的库是私服的,只有在局域网中才能下载到。所以我直接把node_modules复制过来直接使用的。我是从windows系统中复制到macOS中使用。

现象

bash 复制代码
npm run serve

> fronted@0.1.0 serve /Users/itkey/workspace/frontend
> vue-cli-service serve

sh: /Users/itkey/workspace/node_modules/.bin/vue-cli-service: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! fronted@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the fronted@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

解决办法

通过上面可以看出来,应该是没有可执行权限导致的。

bash 复制代码
chmod +x /Users/itkey/workspace/frontend/node_modules/.bin/vue-cli-service

问题得到解决。

相关推荐
掘金安东尼1 天前
纯 CSS 实现弹性文字效果
前端·css
牛奶1 天前
Vue 基础理论 & API 使用
前端·vue.js·面试
牛奶1 天前
Vue 底层原理 & 新特性
前端·vue.js·面试
anOnion1 天前
构建无障碍组件之Radio group pattern
前端·html·交互设计
pe7er1 天前
状态提升:前端开发中的状态管理的设计思想
前端·vue.js·react.js
SoaringHeart1 天前
Flutter调试组件:打印任意组件尺寸位置信息 NRenderBox
前端·flutter
晚风予星1 天前
Ant Design Token Lens 迎来了全面升级!支持在 .tsx 或 .ts 文件中直接使用 Design Token
前端·react.js·visual studio code
sunny_1 天前
⚡️ vite-plugin-oxc:从 Babel 到 Oxc,我为 Vite 写了一个高性能编译插件
前端·webpack·架构
GIS之路1 天前
ArcPy 开发环境搭建
前端
林小帅1 天前
【笔记】OpenClaw 架构浅析
前端·agent