[英]Getting an error when installing Gulp js
I'm trying to install Gulp js on my computer. 我正在尝试在计算机上安装Gulp js。
I think it is installed but not completely because when I run gulp -v
in powershell it returns these lines: 我认为它已安装但未完全安装,因为当我在Powershell中运行gulp -v
,它们返回以下行:
[12:43:04] CLI version 1.3.0
[12:43:04] Local version 3.9.1
But when I want to run .\\node-setup.cmd
it throws the following error: 但是,当我要运行.\\node-setup.cmd
它将引发以下错误:
Error: Cannot find module 'gulp-autoprefixer'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\LOBOS\FDD.WAP\gulpfile.js:5:20)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Press any key to continue . . .
Any ideas how to solve this? 任何想法如何解决这个问题?
most likely you have gulp-autoprefixer as a dependency in the package.json
file of your project but you did not install it locally. 您的项目的package.json
文件中最有可能将gulp-autoprefixer作为依赖项,但您没有在本地安装它。 try to run npm install
from the command line and see if it fix your issue. 尝试从命令行运行npm install
,看看它是否可以解决您的问题。
The problem wouldn't be solved if I would install gulp-autoprefixer
because afterwards it would require another module and after that another module and so on... 如果我将安装gulp-autoprefixer
将无法解决该问题,因为此后它需要另一个模块,之后需要另一个模块,依此类推...
The solution was to deprecate the package.json
file by changing the react-bootstrap-table
from my version (2.8.2) to version 4.0.0-beta.2
. 解决方案是通过将react-bootstrap-table
从我的版本(2.8.2)更改为版本4.0.0-beta.2
来弃用package.json
文件。 By doing so, the json file will have a version which is not depending on react-toastr. 这样,json文件将具有不依赖于react-toastr的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.