当我试图在nuxt项目中运行npm run dev时,我的控制台返回以下消息:

'nuxt' is not recognized as an internal or external command, 
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! andromeda@1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the andromeda@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

推荐答案

我解决了这个问题

链接到答案:

第一步:npm cache clean --force

Step 2: Delete node_modules by $ rm -rf node_modules folder or delete it manually by going into the directory and right-click > delete. Delete package-lock.json file too.

第三步:npm install

重新开始,npm start

感谢所有花时间帮忙的人,非常感谢.

Vue.js相关问答推荐

VueJS使所有组件崩溃,而不是只有一个

在Vue 2中,是否可能在不创建组件的情况下注入代码块?

如何将外部 svg 转换为 Vue3 组件?

单击 v-data-table 中行中的任意位置并移动到另一个页面

路径别名在 vue 脚本块中不起作用

vue router/:param 斜杠的参数

如何使用 Vue 命名插槽呈现静态内容列表?

如何使用 vue-resource 添加额外的标头来发布请求?

如何在 vue 3 脚本设置中的组件上使用 v-model

单击复选框后,V-model 未更新

Keycloak:用户基于角色的客户端登录访问限制

在 Vuejs 中计算 DOM 元素之间距离的最佳方法是什么?

Vue.js 处理多次点击事件

VS代码中的红点是什么意思

阻止 Vue 积极重用 dom 元素

从 vue.js 中的 store 获得的计算(computed)属性的设置器

Vuejs css 范围性能

如何在 JEST 测试中模拟全局 Vue.js 变量

Vue 2.0 设置路由 - 不要使用new来产生副作用

Vue Router beforeRouteLeave 不会停止子组件