使用npm安装sqlite3时出现“ ELIFECYCLE”错误

问题描述

我尝试了所有看似有用的解决方案,但没有任何效果。这包括使用npm cache clean --force清理npm chache,删除“节点模块”,“ package-lock.json”和“ package.json”,然后运行npm installnpm init -y并安装所有依赖项再次。这是错误:

    $ npm install sqlite3
npm WARN deprecated request@2.88.2: request has been deprecated,see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

> sqlite3@5.0.0 install C:\Users\gabmt\OneDrive\Documents\MeusProjetos\iJunior\P&D\JS\next-level-week\node_modules\sqlite3
> node-pre-gyp install --fallback-to-build

'D\JS\next-level-week\node_modules\.bin\' não é reconhecido como um comando interno
ou externo,um programa operável ou um arquivo em lotes.
internal/modules/cjs/loader.js:968
  throw err;
  ^

Error: Cannot find module 'C:\Users\gabmt\OneDrive\Documents\MeusProjetos\iJunior\node-pre-gyp\bin\node-pre-gyp'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',requireStack: []
}
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@5.0.0 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@5.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@5.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\gabmt\AppData\Roaming\npm-cache\_logs\2020-08-18T12_54_48_986Z-debug.log

这是我的package.json文件:

    {
  "name": "next-level-week","version": "1.0.0","description": "Repositório para o projeto feito na NLW.","dependencies": {
    "express": "^4.17.1","nodemon": "^2.0.4","nunjucks": "^3.2.2"
  },"devDependencies": {},"scripts": {
    "start": "nodemon src/server.js","test": "echo \"Error: no test specified\" && exit 1"
  },"repository": {
    "type": "git","url": "git+https://github.com/gabrielmteixeira/next-level-week.git"
  },"keywords": [],"author": "","license": "ISC","bugs": {
    "url": "https://github.com/gabrielmteixeira/next-level-week/issues"
  },"homepage": "https://github.com/gabrielmteixeira/next-level-week#readme"
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...