简体   繁体   中英

gyp ERR! stack Error: Cannot find module 'psl'

I'm trying to run an existing project but I keep getting this error: error logs image

when I try to run "npm i", can someone please explain what this error is about or guide me through the steps to solve it?

TIA

in case you can't see the logs:

npm ERR! code 7 npm ERR! path C:\\Users\\Kumail\\Documents\\XORD\\alon\\alon\\node_modules\\tree-sitter-c npm ERR! command failed npm ERR! command C:\\WINDOWS\\system32\\cmd.exe /d /s /c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@14.17.6 | win32 | x64 npm ERR! gyp info find Python using Python version 3.7.3 found at "C:\\Users\\Kumail\\Anaconda3\\python.exe" npm ERR! gyp ERR! UNCAUGHT EXCEPTION npm ERR! gyp ERR! stack Error: Cannot find module 'psl' npm ERR! gyp ERR! stack Require stack: npm ERR! gyp ERR! stack - C:\\Users\\Kumail\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\request\\node_modules\\tough-cookie\\lib\\pubsuffix-psl.js npm ERR! gyp ERR! stack - C:\\Users\\Kumail\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\request\\node_modules\\tough-cookie\\lib\\cookie.js npm ERR! gyp ERR! stack - C:\\Users\\Kumail\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\request\\lib\\cookies.js npm ERR! gyp ERR! stack - C:\\Users\\Kumail\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\request\\index.js npm ERR! gyp ERR! stack - C:\\Users\\Kumail\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\lib\\install.js npm ERR! gyp ERR! stack - C:\\Users\\Kumail\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\lib\\node-gyp.js npm ERR! gyp ERR! stack - C:\\Users\\Kumail\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js npm ERR! gyp ERR! stack at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15) npm ERR! gyp ERR! stack at Function.Module._load (internal/modules/cjs/loader.js:745:27) npm ERR! gyp ERR! stack at Module.require (internal/modules/cjs/loader.js:961:19) npm ERR! gyp ERR! stack at require (internal/modules/cjs/helpers.js:92:18) npm ERR! gyp ERR! stack at Object. (C:\\Users\\Kumail\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\request\\node_modules\\tough-cookie\\lib\\pubsuffix-psl.js:32:11) npm ERR! gyp ERR! stack at Module._compile (internal/modules/cjs/loader.js:1072:14) npm ERR! gyp ERR! stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) npm ERR! gyp ERR! stack at Module.load (internal/modules/cjs/loader.js:937:32) npm ERR! gyp ERR! stack at Function.Module._load (internal/modules/cjs/loader.js:778:12) npm ERR! gyp ERR! stack at Module.require (internal/modules/cjs/loader.js:961:19) npm ERR! gyp ERR! System Windows_NT 10.0.19042 npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Kumail\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd C:\\Users\\Kumail\\Documents\\XORD\\alon\\alon\\node_modules\\tree-sitter-c npm ERR! gyp ERR! node -v v14.17.6 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! Node-gyp failed to build your package. npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.

npm ERR! A complete log of this run can be found in: npm ERR! C:\\Users\\Kumail\\AppData\\Local\\npm-cache_logs\\2021-11-08T10_21_18_719Z-debug.log

I can't comment because I don't have enough reputation but try running npm install psl and then npm install because the error mentions a package called psl doesn't exist when the code is asking for it. It could be a missing dependency for one of the libraries you have. Let me know how that goes :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM