node.js - 找不到 ionic './ber/index' 模块

标签 node.js npm ionic-framework

我正在构建一个 Ionic 应用程序,并希望为 iOS 构建它。它没有用。我收到一个错误,指出找不到模块。过了一会儿,我通过使用 npm install MODULENAME -g

安装了几个模块来解决这个问题

现在我得到以下错误:

Error: Cannot find module './ber/index'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js:6:11)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

但我不认为 ./ber/index 是一个模块。这就是 npm 所说的。我该如何解决这个问题?

此外,为什么我的所有 npm 模块都丢失了?有办法解决这个问题吗?现在我使用 nmp install MODULENAME -g 手动安装,但它永远不会停止......

最佳答案

从 node_modules 文件夹中删除所有不需要的模块。我有同样的错误,我只是删除了所有不需要的模块,然后我的代码运行良好。

关于node.js - 找不到 ionic './ber/index' 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29938293/

相关文章:

ionic-framework - ionic devapp 只是搜索

javascript - NPM 递归未满足的对等依赖关系

node.js - 如何使用 Node.js 中的钩子(Hook)更改特定列数据? ( Sequelize ,Postgresql)

node.js - -bash 终端中找不到可执行文件命令

javascript - 警告 : flatten is not a function Use --force to continue

cordova - ionic phonegap 构建和 config.xml

cordova - 如何将 CCAvenue 集成到 Ionic 应用程序?

linux - 如何检查导致性能问题的原因

javascript - 使用事件流结束处理流

npm - "npm install"给出错误消息 "invalid",这是什么?