I am working on a project with OpenAI API and while it works fine on laptop it's not working on my desktop.
I cloned my project from git then I used npm install command after npm init command. When I use npm install npm didn't throw any err or warning and manipulated my package-lock.json as below
{
"name": "open-api",
"version": "2.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "open-api",
"version": "2.0.0",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.0.0",
"express": "^4.18.0",
"openai": "^2.0.5"
},
"devDependencies": {}
},
"ode_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
"extraneous": true,
"dependencies": {
"mime-types": "~2.1.34",
"negotiator": "0.6.3"
},
"devDependencies": {
"deep-equal": "1.0.1",
"eslint": "7.32.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.3.1",
"eslint-plugin-standard": "4.1.0",
"mocha": "9.2.0",
"nyc": "15.1.0"
},
"engines": {
"node": ">= 0.6"
}
},
while my original code in package-lock.json was exactly like this
{
"name": "open-api",
"version": "2.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "open-api",
"version": "2.0.0",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.0.0",
"express": "^4.18.0",
"openai": "^2.0.5"
},
"devDependencies": {}
},
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
"dependencies": {
"mime-types": "~2.1.34",
"negotiator": "0.6.3"
},
"engines": {
"node": ">= 0.6"
}
package.json if you need to look out;
{
"name": "open-api",
"version": "2.0.0",
"main": "index.js",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.0.0",
"express": "^4.18.0",
"openai": "^2.0.5"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"description": ""
}
Because of this manipulation npm didn't install any node_modules and always manipulates package-lock.json with "ode_modules", "de_modules" or "_modules" named dependencies and I don't understand why there isn't any err messages to figure out this problem.
I tried to;
- Delete package-lock.json and npm install again
- Install all packages with npm install "package name" for each manually but versions returned in dependencies as "*"
"name": "open-api",
"version": "2.0.0",
"main": "index.js",
"dependencies": {
"express": "*"
},
- npm install --verbose didn't find any errors in logs
npm verb cli [
npm verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli 'install',
npm verb cli '--verbose'
npm verb cli ]
npm info using npm@8.5.5
npm info using node@v16.15.0
npm timing npm:load:whichnode Completed in 1ms
npm timing config:load:defaults Completed in 1ms
npm timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 3ms
npm timing config:load:builtin Completed in 3ms
npm timing config:load:cli Completed in 2ms
npm timing config:load:env Completed in 0ms
npm timing config:load:file:F:\Programlar\İş\Denemeler\OpenAI\server\.npmrc Completed in 0ms
npm timing config:load:project Completed in 4ms
npm timing config:load:file:C:\Users\Murat\.npmrc Completed in 0ms
npm timing config:load:user Completed in 0ms
npm timing config:load:file:C:\Users\Murat\AppData\Roaming\npm\etc\npmrc Completed in 0ms
npm timing config:load:global Completed in 0ms
npm timing config:load:validate Completed in 0ms
npm timing config:load:credentials Completed in 1ms
npm timing config:load:setEnvs Completed in 0ms
npm timing config:load Completed in 12ms
npm timing npm:load:configload Completed in 12ms
npm timing npm:load:setTitle Completed in 1ms
npm timing config:load:flatten Completed in 3ms
npm timing npm:load:display Completed in 14ms
npm verb logfile C:\Users\Murat\AppData\Local\npm-cache\_logs\2022-05-01T13_46_15_241Z-debug-0.log
npm timing npm:load:logFile Completed in 6ms
npm timing npm:load:timers Completed in 0ms
npm timing npm:load:configScope Completed in 0ms
npm timing npm:load Completed in 35ms
npm timing arborist:ctor Completed in 0ms
npm timing idealTree:init Completed in 31ms
npm timing idealTree:userRequests Completed in 1ms
npm verb shrinkwrap failed to load ode_modules/.package-lock.json missing from lockfile: ode_modules/accepts
npm http fetch GET 200 https://registry.npmjs.org/cors 522ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/dotenv 133ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/express 6ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/openai 938ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/content-disposition 75ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/body-parser 78ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/accepts 79ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/vary 81ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/cookie 82ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/cookie-signature 83ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/content-type 86ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/encodeurl 85ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/array-flatten 90ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/escape-html 89ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/depd 91ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/finalhandler 91ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/merge-descriptors 91ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/http-errors 94ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/fresh 95ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/etag 97ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/on-finished 98ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/parseurl 97ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/methods 100ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/path-to-regexp 99ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/debug 107ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/proxy-addr 101ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/safe-buffer 100ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/qs 101ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/send 101ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/statuses 100ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/range-parser 104ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/serve-static 103ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/type-is 103ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/utils-merge 104ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/setprototypeof 109ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/object-assign 183ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/form-data 418ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/axios 439ms (cache revalidated)
npm timing idealTree:#root Completed in 2078ms
npm timing idealTree:ode_modules/cors Completed in 2ms
npm timing idealTree:ode_modules/dotenv Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/toidentifier 34ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/bytes 40ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/mime-types 42ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/unpipe 41ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/iconv-lite 46ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/destroy 47ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/negotiator 49ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/ee-first 44ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/raw-body 49ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/ipaddr.js 46ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/inherits 49ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/ms 50ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/side-channel 49ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/forwarded 55ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/media-typer 54ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/mime 57ms (cache hit)
npm timing idealTree:ode_modules/express Completed in 101ms
npm http fetch GET 200 https://registry.npmjs.org/mime-db 4ms (cache hit)
npm timing idealTree:ode_modules/accepts Completed in 8ms
npm timing idealTree:ode_modules/array-flatten Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/safer-buffer 4ms (cache hit)
npm timing idealTree:ode_modules/body-parser Completed in 16ms
npm timing idealTree:ode_modules/bytes Completed in 0ms
npm timing idealTree:ode_modules/content-disposition Completed in 1ms
npm timing idealTree:ode_modules/content-type Completed in 0ms
npm timing idealTree:ode_modules/cookie Completed in 0ms
npm timing idealTree:ode_modules/cookie-signature Completed in 0ms
npm timing idealTree:ode_modules/debug Completed in 1ms
npm timing idealTree:ode_modules/depd Completed in 0ms
npm timing idealTree:ode_modules/destroy Completed in 0ms
npm timing idealTree:ode_modules/encodeurl Completed in 0ms
npm timing idealTree:ode_modules/escape-html Completed in 0ms
npm timing idealTree:ode_modules/etag Completed in 0ms
npm timing idealTree:ode_modules/finalhandler Completed in 5ms
npm timing idealTree:ode_modules/debug Completed in 0ms
npm timing idealTree:ode_modules/encodeurl Completed in 0ms
npm timing idealTree:ode_modules/escape-html Completed in 0ms
npm timing idealTree:ode_modules/fresh Completed in 0ms
npm timing idealTree:ode_modules/http-errors Completed in 3ms
npm timing idealTree:ode_modules/depd Completed in 0ms
npm timing idealTree:ode_modules/iconv-lite Completed in 1ms
npm timing idealTree:ode_modules/inherits Completed in 0ms
npm timing idealTree:ode_modules/merge-descriptors Completed in 0ms
npm timing idealTree:ode_modules/methods Completed in 0ms
npm timing idealTree:ode_modules/mime-types Completed in 1ms
npm timing idealTree:ode_modules/mime-db Completed in 0ms
npm timing idealTree:ode_modules/ms Completed in 0ms
npm timing idealTree:ode_modules/negotiator Completed in 0ms
npm timing idealTree:ode_modules/object-assign Completed in 0ms
npm timing idealTree:ode_modules/on-finished Completed in 0ms
npm timing idealTree:ode_modules/ee-first Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/combined-stream 138ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/asynckit 140ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/follow-redirects 935ms (cache revalidated)
npm timing idealTree:ode_modules/openai Completed in 937ms
npm timing idealTree:ode_modules/axios Completed in 2ms
npm timing idealTree:ode_modules/follow-redirects Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/delayed-stream 149ms (cache revalidated)
npm timing idealTree:ode_modules/form-data Completed in 153ms
npm timing idealTree:ode_modules/asynckit Completed in 0ms
npm timing idealTree:ode_modules/combined-stream Completed in 1ms
npm timing idealTree:ode_modules/delayed-stream Completed in 0ms
npm timing idealTree:ode_modules/mime-types Completed in 0ms
npm timing idealTree:ode_modules/mime-db Completed in 0ms
npm timing idealTree:ode_modules/parseurl Completed in 0ms
npm timing idealTree:ode_modules/path-to-regexp Completed in 0ms
npm timing idealTree:ode_modules/proxy-addr Completed in 1ms
npm timing idealTree:ode_modules/forwarded Completed in 0ms
npm timing idealTree:ode_modules/ipaddr.js Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/get-intrinsic 9ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/call-bind 11ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/object-inspect 11ms (cache hit)
npm timing idealTree:ode_modules/qs Completed in 15ms
npm timing idealTree:ode_modules/range-parser Completed in 0ms
npm timing idealTree:ode_modules/raw-body Completed in 4ms
npm timing idealTree:ode_modules/bytes Completed in 0ms
npm timing idealTree:ode_modules/http-errors Completed in 3ms
npm timing idealTree:ode_modules/depd Completed in 0ms
npm timing idealTree:ode_modules/iconv-lite Completed in 1ms
npm timing idealTree:ode_modules/inherits Completed in 0ms
npm timing idealTree:ode_modules/safe-buffer Completed in 0ms
npm timing idealTree:ode_modules/safer-buffer Completed in 0ms
npm timing idealTree:ode_modules/send Completed in 12ms
npm timing idealTree:ode_modules/debug Completed in 2ms
npm timing idealTree:ode_modules/depd Completed in 0ms
npm timing idealTree:ode_modules/destroy Completed in 0ms
npm timing idealTree:ode_modules/encodeurl Completed in 0ms
npm timing idealTree:ode_modules/escape-html Completed in 0ms
npm timing idealTree:ode_modules/etag Completed in 0ms
npm timing idealTree:ode_modules/fresh Completed in 0ms
npm timing idealTree:ode_modules/http-errors Completed in 5ms
npm timing idealTree:ode_modules/depd Completed in 0ms
npm timing idealTree:ode_modules/inherits Completed in 1ms
npm timing idealTree:ode_modules/mime Completed in 0ms
npm timing idealTree:ode_modules/ms Completed in 0ms
npm timing idealTree:ode_modules/on-finished Completed in 1ms
npm timing idealTree:ode_modules/ee-first Completed in 0ms
npm timing idealTree:ode_modules/range-parser Completed in 0ms
npm timing idealTree:ode_modules/serve-static Completed in 3ms
npm timing idealTree:ode_modules/encodeurl Completed in 0ms
npm timing idealTree:ode_modules/escape-html Completed in 0ms
npm timing idealTree:ode_modules/parseurl Completed in 0ms
npm timing idealTree:ode_modules/send Completed in 7ms
npm timing idealTree:ode_modules/debug Completed in 1ms
npm timing idealTree:ode_modules/depd Completed in 0ms
npm timing idealTree:ode_modules/destroy Completed in 0ms
npm timing idealTree:ode_modules/encodeurl Completed in 0ms
npm timing idealTree:ode_modules/escape-html Completed in 0ms
npm timing idealTree:ode_modules/etag Completed in 0ms
npm timing idealTree:ode_modules/fresh Completed in 0ms
npm timing idealTree:ode_modules/http-errors Completed in 5ms
npm timing idealTree:ode_modules/depd Completed in 0ms
npm timing idealTree:ode_modules/inherits Completed in 0ms
npm timing idealTree:ode_modules/mime Completed in 0ms
npm timing idealTree:ode_modules/ms Completed in 0ms
npm timing idealTree:ode_modules/on-finished Completed in 1ms
npm timing idealTree:ode_modules/ee-first Completed in 0ms
npm timing idealTree:ode_modules/range-parser Completed in 0ms
npm timing idealTree:ode_modules/setprototypeof Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/has 7ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/has-symbols 7ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/function-bind 9ms (cache hit)
npm timing idealTree:ode_modules/side-channel Completed in 13ms
npm timing idealTree:ode_modules/call-bind Completed in 3ms
npm timing idealTree:ode_modules/function-bind Completed in 0ms
npm timing idealTree:ode_modules/get-intrinsic Completed in 1ms
npm timing idealTree:ode_modules/function-bind Completed in 1ms
npm timing idealTree:ode_modules/has Completed in 1ms
npm timing idealTree:ode_modules/function-bind Completed in 0ms
npm timing idealTree:ode_modules/has-symbols Completed in 0ms
npm timing idealTree:ode_modules/object-inspect Completed in 0ms
npm timing idealTree:ode_modules/statuses Completed in 0ms
npm timing idealTree:ode_modules/toidentifier Completed in 0ms
npm timing idealTree:ode_modules/type-is Completed in 2ms
npm timing idealTree:ode_modules/media-typer Completed in 0ms
npm timing idealTree:ode_modules/mime-types Completed in 1ms
npm timing idealTree:ode_modules/mime-db Completed in 0ms
npm timing idealTree:ode_modules/unpipe Completed in 0ms
npm timing idealTree:ode_modules/utils-merge Completed in 0ms
npm timing idealTree:ode_modules/vary Completed in 0ms
npm timing idealTree:buildDeps Completed in 3438ms
npm timing idealTree:fixDepFlags Completed in 0ms
npm timing idealTree Completed in 3472ms
npm timing reify:loadTrees Completed in 3473ms
npm timing reify:diffTrees Completed in 0ms
npm timing reify:retireShallow Completed in 0ms
npm timing reify:createSparse Completed in 0ms
npm timing reify:loadBundles Completed in 0ms
npm timing reify:unpack Completed in 1ms
npm timing reify:unretire Completed in 0ms
npm timing build:queue Completed in 0ms
npm timing build:deps Completed in 0ms
npm timing build Completed in 1ms
npm timing reify:build Completed in 2ms
npm timing reify:trash Completed in 0ms
npm timing reify:save Completed in 11ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 354ms
npm timing auditReport:getReport Completed in 357ms
npm timing auditReport:init Completed in 0ms
npm timing reify:audit Completed in 358ms
npm timing reify Completed in 3844ms
up to date, audited 67 packages in 4s
found 0 vulnerabilities
npm timing command:install Completed in 3851ms
npm verb exit 0
npm timing npm Completed in 4132ms
npm info ok
- Delete node and npm completely as described here How to completely remove node.js from Windows
None of those worked for me is there any solutions for this?
P.s: yarn install worked properly but this isn't a solution in my case, I need to work with npm