我尝试了所有看似有用的解决方案,但没有任何效果。这包括使用npm cache clean --force
清理npm chache,删除“节点模块”,“ package-lock.json”和“ package.json”,然后运行npm install
,npm 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":"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 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"
}