Relative Content

Tag Archive for node.jsnpm

how to exclude npm sub dependencies or replace package in whole project with new package

I have already rewrite the @codemirror/autocomplete package and publish the modified package as rdcodemirror-autocomplete, and now using the modified package in my project. Now I found the rdcodemirror-autocomplete conflict with the @codemirror/autocomplete package, I just want to keep one of them. now the autocomplate event will trigger twice.This is the package.lock:

how to exclude npm sub dependencies or replace package in whole project with new package

I have already rewrite the @codemirror/autocomplete package and publish the modified package as rdcodemirror-autocomplete, and now using the modified package in my project. Now I found the rdcodemirror-autocomplete conflict with the @codemirror/autocomplete package, I just want to keep one of them. now the autocomplate event will trigger twice.This is the package.lock:

Error: Cannot find module ‘../../package.json. Cannot use NPM command

:internal/modules/cjs/loader:1148 throw err; ^ Error: Cannot find module ‘../../package.json’ Require stack: – C:UsersS.Mohammed JunaithAppDataRoamingnpmnode_modulesnpmlibclivalidate-engines.js – C:UsersS.Mohammed JunaithAppDataRoamingnpmnode_modulesnpmlibcli.js – C:UsersS.Mohammed JunaithAppDataRoamingnpmnode_modulesnpmbinnpm-cli.js at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15) at Module._load (node:internal/modules/cjs/loader:986:27) at Module.require (node:internal/modules/cjs/loader:1233:19) at require (node:internal/modules/helpers:179:18) at Object.<anonymous> (C:UsersS.Mohammed JunaithAppDataRoamingnpmnode_modulesnpmlibclivalidate-engines.js:8:49) at Module._compile (node:internal/modules/cjs/loader:1358:14) at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) at Module.load (node:internal/modules/cjs/loader:1208:32) at Module._load (node:internal/modules/cjs/loader:1024:12) at Module.require (node:internal/modules/cjs/loader:1233:19) { code: ‘MODULE_NOT_FOUND’, requireStack: […]

How do I properly get Node.JS processes to end programmatically?

I am currently developing an NPM module for use with NX. In this module, I have 2 child processes that I am spawning and no matter what I have done it just won’t work unless I am debugging it manually. One of the main reasons this is as concerning to me as it is, is that the NX process won’t close until both of the child processes finish. For clarification, both of these processes start a server of some kind for the sake of E2E tests. I am also developing this on a windows machine. So for context, process.platform will always return 'win32'

Framework for decentralized identiy / authentication?

Hi I am searching for a framework a decentralized identity / authentication. I plan to setup multiple instances of a web app and they can authenticate to each other without hold the user credentials. Also SSO login with Google, GitHub etc. should be possible. Is there already a maintened npm implementation? I use nodejs as backend.

TypeError: Cannot read properties of undefined (reading ‘paramType’)

npm run build && npm run serve
[email protected] build
npm run clean && tsc -p tsconfig.json && npm run info && cp src/build-manifest.json dist/build-manifest.json
[email protected] clean
rm -rf dist
[email protected] info
node dist/src/getInfo.js > dist/info.json
(node:1928167) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)
[email protected] serve
cross-env-shell node –inspect dist/src/startup.js ./.env.dev
Debugger listening on ws://127.0.0.1:9229/d3f2fed7-a36d-4e6d-8466-8552e2bee8a2
For help, see: https://nodejs.org/en/docs/inspector
[2024-07-26T10:52:00.964] [DEBUG] [TSED] – Start server…
[2024-07-26T10:52:00.982] [INFO ] [TSED] – Loading EXPRESS platform adapter… +15ms
[2024-07-26T10:52:01.067] [INFO ] [TSED] – Injector created… +85ms
[2024-07-26T10:52:01.068] [INFO ] [TSED] – Build providers +1ms
[2024-07-26T10:52:01.109] [INFO ] [TSED] – Settings and injector loaded… +41ms
[2024-07-26T10:52:01.109] [INFO ] [TSED] – Mount app context +0ms
[2024-07-26T10:52:01.110] [INFO ] [TSED] – Load routes +1ms
[2024-07-26T10:52:01.138] [ERROR] [TSED] – TypeError: Cannot read properties of undefined (reading ‘paramType’)
at file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformHandlerMetadata.js:85:52
at Array.findIndex (<anonymous>)
at PlatformHandlerMetadata.hasParamType (file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformHandlerMetadata.js:85:33)
at new PlatformHandlerMetadata (file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformHandlerMetadata.js:23:41)
at PlatformHandlerMetadata.from (file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformHandlerMetadata.js:59:20)
at file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformRouter.js:57:48
at Array.map (<anonymous>)
at PlatformRouter.addRoute (file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformRouter.js:56:32)
at file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformRouters.js:79:20
at Array.forEach (<anonymous>)your text
How to resolve the issue , please help me`

TypeError: Cannot read properties of undefined (reading ‘paramType’)

npm run build && npm run serve
[email protected] build
npm run clean && tsc -p tsconfig.json && npm run info && cp src/build-manifest.json dist/build-manifest.json
[email protected] clean
rm -rf dist
[email protected] info
node dist/src/getInfo.js > dist/info.json
(node:1928167) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)
[email protected] serve
cross-env-shell node –inspect dist/src/startup.js ./.env.dev
Debugger listening on ws://127.0.0.1:9229/d3f2fed7-a36d-4e6d-8466-8552e2bee8a2
For help, see: https://nodejs.org/en/docs/inspector
[2024-07-26T10:52:00.964] [DEBUG] [TSED] – Start server…
[2024-07-26T10:52:00.982] [INFO ] [TSED] – Loading EXPRESS platform adapter… +15ms
[2024-07-26T10:52:01.067] [INFO ] [TSED] – Injector created… +85ms
[2024-07-26T10:52:01.068] [INFO ] [TSED] – Build providers +1ms
[2024-07-26T10:52:01.109] [INFO ] [TSED] – Settings and injector loaded… +41ms
[2024-07-26T10:52:01.109] [INFO ] [TSED] – Mount app context +0ms
[2024-07-26T10:52:01.110] [INFO ] [TSED] – Load routes +1ms
[2024-07-26T10:52:01.138] [ERROR] [TSED] – TypeError: Cannot read properties of undefined (reading ‘paramType’)
at file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformHandlerMetadata.js:85:52
at Array.findIndex (<anonymous>)
at PlatformHandlerMetadata.hasParamType (file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformHandlerMetadata.js:85:33)
at new PlatformHandlerMetadata (file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformHandlerMetadata.js:23:41)
at PlatformHandlerMetadata.from (file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformHandlerMetadata.js:59:20)
at file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformRouter.js:57:48
at Array.map (<anonymous>)
at PlatformRouter.addRoute (file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformRouter.js:56:32)
at file:///home/wada/code/testcenter-api/node_modules/@tsed/platform-router/lib/esm/domain/PlatformRouters.js:79:20
at Array.forEach (<anonymous>)your text
How to resolve the issue , please help me`