找不到模块'_baseIsRegExp' [英] Cannot find module '_baseIsRegExp'

查看:78
本文介绍了找不到模块'_baseIsRegExp'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行gulp时出现此错误,我已经安装了 babel-register .

I am getting this error while running gulp, I already have babel-register installed.

[18:51:21] Requiring external module babel-register
    module.js:327
        throw err;
        ^

    Error: Cannot find module './_baseIsRegExp'
        at Function.Module._resolveFilename (module.js:325:15)
        at Function.Module._load (module.js:276:25)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> (D:\ndbsite\src\NdbSite.UI\node_modules\babel-plugin-transform-class-properties\node_modules\babel-helper-function-name\node_modules\babel-types\node_modules\lodash\isRegExp.js:1:82)
        at Module._compile (module.js:409:26)
        at Module._extensions..js (module.js:416:10)
        at Object.require.extensions.(anonymous function) [as .js] (D:\ndbsite\src\NdbSite.UI\node_modules\babel-register\lib\node.js:156:7)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)

似乎我缺少一些包装.不确定如何找到它.请帮忙.

seems I am missing some package. Not sure how to find it. Please Help.

推荐答案

由于其他模块中引用的旧软件包,我面临的问题未更新正如@loganfsmyth在评论中所建议的.我更新了节点&npm.由于旧软件包未在层次结构内更新,因此仍然存在问题.

The issue I was facing because of old packages referenced inside other Modules were not updated As suggested by @loganfsmyth in comment. I updated node & npm. Still issue exists since old packages were not updated inside the hierarchy.

解决方案是使用rimraf删除旧文件夹,然后使用新节点& npm安装npm.npm:

Resolution is to delete old folders using rimraf and then npm install with new node & npm :

npm install rimraf -g

rimraf node_modules

npm install

这篇关于找不到模块'_baseIsRegExp'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆