【问题标题】:when i tried npm start this error happens当我尝试 npm start 时发生此错误
【发布时间】:2021-04-23 18:32:26
【问题描述】:

我正在使用这个:https://github.com/SomnathDas/Whatsapp-Botto-Re 这是 npm 安装中的问题还是以前文件的问题? 我是初学者,所以请帮助我

$ npm start
    > whatsapp-botto-re@3.0.1 start E:\git bashh\TEST\whatsapp-botto-Re
    > node index.js
    internal/modules/cjs/loader.js:883
      throw err;
      ^
    
    Error: Cannot find module '@open-wa/wa-automate'
    Require stack:
    - E:\git bashh\TEST\whatsapp-botto-Re\index.js
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
        at Function.Module._load (internal/modules/cjs/loader.js:725:27)
        at Module.require (internal/modules/cjs/loader.js:952:19)
        at require (internal/modules/cjs/helpers.js:88:18)
        at Object.<anonymous> (E:\git bashh\TEST\whatsapp-botto-Re\index.js:1:20)
        at Module._compile (internal/modules/cjs/loader.js:1063:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
        at Module.load (internal/modules/cjs/loader.js:928:32)
        at Function.Module._load (internal/modules/cjs/loader.js:769:14)
        at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [ 'E:\\git bashh\\TEST\\whatsapp-botto-Re\\index.js' ]
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! whatsapp-botto-re@3.0.1 start: `node index.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the whatsapp-botto-re@3.0.1 start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm WARN Local package.json exists, but node_modules missing, did you mean to install?
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Bilal\AppData\Roaming\npm-cache\_logs\2021-01-19T12_24_18_581Z-debug.log

【问题讨论】:

  • 嗨,你在npm start之前运行过npm install吗?

标签: node.js git npm


【解决方案1】:

尝试在控制台中执行npm install。错误是因为尚未安装依赖项。错误信息中给出了提示:

npm WARN Local package.json exists, but node_modules missing, did you mean to install?

【讨论】:

    【解决方案2】:

    克隆项目后。在项目目录下执行这个命令:

    npm install

    这将安装所有依赖项。

    然后尝试运行它。

    【讨论】:

      猜你喜欢
      • 2020-04-23
      • 2020-04-20
      • 2021-11-30
      • 2023-01-17
      • 2020-10-09
      • 1970-01-01
      • 2020-10-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多