npm run dev报错解决方案

个人问题仅供参考:

使用npm run dev 运行,出现如下错误 :

Failed to compile.

./src/styles/index.scss (./node_modules/css-loader??ref--11-1!./node_modules/postcss-loader/lib??ref--11-2!./node_modules/sass-loader/lib/loader.js??ref--11-3!./src/styles/index.scss)

Module build failed (from ./node_modules/sass-loader/lib/loader.js):

Error: Missing binding E:\test\node_modules\node-sass\vendor\win32-x64-67\binding.node

Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 11.x

Found bindings for the following environments:

- Windows 64-bit with Node.js 10.x

This usually happens because your environment has changed since running `npm install`.

Run `npm rebuild node-sass` to download the binding for your current environment.

首先在项目目录下依次安装以下文件:

npm install node-sass

npm i node-sass -D

如果继续报错,会提醒安装element-ui就可以运行项目了,我们继续在项目目录下安装它就好了:

npm install --save element-ui

然后运行项目就OK啦,终于不报错啦!

原文地址:https://www.cnblogs.com/furenjian/p/12604073.html

时间: 2024-10-10 08:55:57

npm run dev报错解决方案的相关文章

npm run dev报错,events.js:160 throw er; // Unhandled 'error' event

错误代码如下: [email protected] dev E:MySoftwaretestGitwebpackvue-projectnode build/dev-server.js "8088" events.js:160 throw er; // Unhandled 'error' event ^ Error: listen EACCES 0.0.0.0:8080 at Object.exports._errnoException (util.js:1026:11) at expo

vue项目npm run dev报错events.js:160 throw er; // Unhandled 'error' event listen EADDRINUSE :::8002

出错情况,如下图: 报错原因: listen EADDRINUSE :::8002 意思是当前8002端口被占用 解决办法: 一:简单粗暴:关掉可能影响的相关程序,重新执行启动. 二: 1.Win+R,cmd查询使用的端口号是否被占用: 输入命令:netstat -aon|findstr "8002" 按回车显示占用8080端口对应的程序的PID号:如下图: 2.根据PID号找到对应的程序: 输入命令:tasklist|findstr "12452" 按回车后显示出

nuxt.js 初始化 npm run dev 报错

在初始化 npm install 了基本依赖后: npm run dev 报错: error in ./server/index.js Module build failed: Error: Plugin/Preset files are not allowed to export objects, only functions. In C:\Users\L\Desktop\Nuxt\nuxt-learn\node_modules\backpack-core\babel.js at create

vue 运行npm run dev报错

npm run dev运行时报错,原因有很多. 一般用下面这种方法都能解决的. 最简单粗暴的方法: 1.删除依赖包node_modules 2.然后重新npm install就行了 (如果这步报错了,试试cnpm install) 原文地址:https://www.cnblogs.com/Mrrabbit/p/8619188.html

npm run dev 报错 run `npm audit fix` to fix them, or `npm audit` for details

前几天写的直接运行npm run dev还是ok的,突然不行了,前面报错是css-loader没有,删除style标签上的lang='scss'就好了,先不需要这个依赖.这个先不管. 只是后面的 run `npm audit fix` to fix them, or `npm audit` for details,来回依据指令好几次,依然是这样.... 解决:运行 npm audit fix --force..npm install..貌似解决了 原文地址:https://www.cnblogs

npm run dev 报错:missing script:dev

问题: 今天在运行vue项目时,在mac终端输入npm run dev,结果报错: 翻译是: npm错误:缺少script:dev npm错误:完整路径见:users/mymac/ .npm/_logs/2018-09-17T08_50_26_450Z-debug.log 解决办法: 1.打开相应的vue项目文件夹(我的项目名称是:my-project),打开package.json. 2.发现:在script里,并没有dev,而是serve,应该用npm run serve命令运行vue项目.

vue 项目启动时npm run dev 报错

PS D:\VS-workpase\maishou-c> npm install [email protected] > [email protected] install D:\VS-workpase\maishou-c\node_modules\node-sass> node scripts/install.js Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/win

关于vue使用 npm run dev报错原因

> [email protected]0.1.0 dev D:\my-project > webpack-dev-server --inline --progress --config build/webpack.dev.conf.js internal/modules/cjs/loader.js:796 throw err; ^ Error: Cannot find module 'D:\my-project\build\webpack.dev.conf.js' Require stack:

npm run dev报错

今天看到一个不错的开源项目DncZeus 按说明运行 npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! [email protected] dev: `vue-cli-service serve --open`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the [email protected] dev script.npm ERR! This is probably not a problem