enter image description here
The following error is occurring when running tests on my code.
rror [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rules/no-warning-comments' is not defined by "exports" in /data/credenceInternship/iwf-cli/node_modules/eslint/package.json
at throwExportsNotFound (internal/modules/esm/resolve.js:290:9)
at packageExportsResolve (internal/modules/esm/resolve.js:513:3)
at resolveExports (internal/modules/cjs/loader.js:432:36)
at Function.Module._findPath (internal/modules/cjs/loader.js:472:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (/data/credenceInternship/iwf-cli/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/data/credenceInternship/iwf-cli/node_modules/eslint-plugin-unicorn/rules/expiring-todo-comments.js:5:18)
at Module._compile (/data/credenceInternship/iwf-cli/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
Related
C:\Users\sharm\codeweb\eth-to-do-list>npm run dev
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
> eth-to-do-list#1.0.0 dev
> lite-server
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module './dist/rx'
Require stack:
- C:\Users\sharm\codeweb\eth-to-do-list\node_modules\rx\index.js
- C:\Users\sharm\codeweb\eth-to-do-list\node_modules\browser-sync\dist\file-watcher.js
- C:\Users\sharm\codeweb\eth-to-do-list\node_modules\browser-sync\dist\browser-sync.js
- C:\Users\sharm\codeweb\eth-to-do-list\node_modules\browser-sync\dist\index.js
- C:\Users\sharm\codeweb\eth-to-do-list\node_modules\lite-server\lib\lite-server.js
- C:\Users\sharm\codeweb\eth-to-do-list\node_modules\lite-server\bin\lite-server
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\sharm\codeweb\eth-to-do-list\node_modules\rx\index.js:1:10)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\sharm\\codeweb\\eth-to-do-list\\node_modules\\rx\\index.js',
'C:\\Users\\sharm\\codeweb\\eth-to-do-list\\node_modules\\browser-sync\\dist\\file-watcher.js',
'C:\\Users\\sharm\\codeweb\\eth-to-do-list\\node_modules\\browser-sync\\dist\\browser-sync.js',
'C:\\Users\\sharm\\codeweb\\eth-to-do-list\\node_modules\\browser-sync\\dist\\index.js',
'C:\\Users\\sharm\\codeweb\\eth-to-do-list\\node_modules\\lite-server\\lib\\lite-server.js',
'C:\\Users\\sharm\\codeweb\\eth-to-do-list\\node_modules\\lite-server\\bin\\lite-server'
]
}
I'm using macOS Monterey 12.2.1, Apple M1. And in the project directory, I installed opencv-build and opencv4nodejs by this script code:
"scripts": { "postinstall": "npm i opencv-build && npm i opencv4nodejs" }
When I run cv = require('opencv4nodejs'), I got this error message and I can't understand it. How can I run this code correctly?
/usr/local/bin/node /Users/david/Desktop/project2/main.js
/Users/david/Desktop/project2/node_modules/opencv4nodejs/lib/cv.js:47
throw err
^
Error: Cannot find module '/Users/david/Desktop/project2/node_modules/opencv4nodejs/build/Release/opencv4nodejs'
Require stack:
- /Users/david/Desktop/project2/node_modules/opencv4nodejs/lib/cv.js
- /Users/david/Desktop/project2/node_modules/opencv4nodejs/lib/opencv4nodejs.js
- /Users/david/Desktop/project2/main.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/david/Desktop/project2/node_modules/opencv4nodejs/lib/cv.js:40:8)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/david/Desktop/project2/node_modules/opencv4nodejs/lib/cv.js',
'/Users/david/Desktop/project2/node_modules/opencv4nodejs/lib/opencv4nodejs.js',
'/Users/david/Desktop/project2/main.js'
]
}
Process finished with exit code 1
Use Node 14.18.1, then uninstall opencv4nodejs.
Run export CXXFLAGS="-std=c++14 -Wno-c++11-narrowing"
Run npm install opencv4nodejs
I got this error while running the above command (npx react-native init MainApp)
I have installed the latest version of node and npm. I am not sure why this error is reflected.
Tried clearing the cache changing the node version to 17 but no luck. I am new to this react native.
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module './error'
Require stack:
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#hapi\hoek\lib\assert.js
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#hapi\topo\lib\index.js
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\node_modules\joi\lib\types\keys.js
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\node_modules\joi\lib\types\function.js
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\node_modules\joi\lib\index.js
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\build\tools\config\schema.js
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\build\tools\config\readConfigFromDisk.js
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\build\tools\config\index.js
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\build\commands\install\install.js
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\build\commands\index.js
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\build\index.js
- C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\build\bin.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\priye\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#hapi\hoek\lib\assert.js:3:21)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#hapi\\hoek\\lib\\assert.js',
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#hapi\\topo\\lib\\index.js',
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\node_modules\\joi\\lib\\types\\keys.js',
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\node_modules\\joi\\lib\\types\\function.js',
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\node_modules\\joi\\lib\\index.js',
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\build\\tools\\config\\schema.js',
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\build\\tools\\config\\readConfigFromDisk.js',
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\build\\tools\\config\\index.js',
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\build\\commands\\install\\install.js',
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\build\\commands\\index.js',
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\build\\index.js',
'C:\\Users\\priye\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\build\\bin.js'
]
}
Hi I myself resolved the issue. I deleted the npm-cache folder from the AppData folder and it worked :). Thanks
I'm trying to run a custom module in node.js, but for some reason it spits out this error:
Require stack:
- C:\Users\Administrator\Desktop\Sitev\Site\general.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15
)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\Administrator\Desktop\Sitev\Site\general.js:7:1)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_ma
in:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\Administrator\\Desktop\\Sitev\\Site\\genera
l.js'
]
}
Node.js v17.1.0
Thing is the thing im trying to require is right there
I tried everything, Here is combinations of require that i tried
require(".\page_serve")
require(".\page_serve.js")
require("./page_serve")
require("./page_serve.js")
require("page_serve")
require("page_serve.js")
I tried all of them but still the same error
Operating system is windows server 2012
I forgot the variable itself.
Correct one should be:
let page_serve = require("./page_serve")
The bot worked perfectly until one day (without touching anything) it stopped working and I got this error in the node_modules folder:
internal/modules/cjs/loader.js:834
throw err;
^
Error: Cannot find module '../build/Release/canvas.node'
Require stack:
- /home/container/node_modules/canvas/lib/bindings.js
- /home/container/node_modules/canvas/lib/canvas.js
- /home/container/node_modules/canvas/index.js
- /home/container/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:903:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/container/node_modules/canvas/lib/bindings.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:903:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/container/node_modules/canvas/lib/bindings.js',
'/home/container/node_modules/canvas/lib/canvas.js',
'/home/container/node_modules/canvas/index.js',
'/home/container/index.js'
]
}