nodemon crashes after adding its' dependencies - mean

I can't seem to track down why nodemon is crashing after it loads its dependencies and starts. I'm doing a MEAN API tutorial and I want to use it to automate restarting the node server. Any help would be greatly appreciated. Here is the stacktrace:
C:\nodeprojects\bookstore>npm install -g nodemon
C:\Users\brohj_000\AppData\Roaming\npm\nodemon -> C:\Users\brohj_000\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js
> nodemon#1.14.11 postinstall C:\Users\brohj_000\AppData\Roaming\npm\node_modules\nodemon
> node -e "console.log('\u001b[32mLove nodemon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/nodemon/donat
e\u001b[0m\n')" || exit 0
Love nodemon? You can now support the project via the open collective:
> https://opencollective.com/nodemon/donate
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\nodemon\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ nodemon#1.14.11
added 247 packages in 103.866s
C:\nodeprojects\bookstore>nodemon
[nodemon] 1.14.11
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node app.js`
Running on port 3000...
(node:6748) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See
http://mongoosejs.com/docs/connections.html#use-mongo-client
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::3000
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1257:14)
at listen (net.js:1293:10)
at Server.listen (net.js:1389:5)
at EventEmitter.listen (C:\nodeprojects\bookstore\node_modules\express\lib\application.js:618:24)
at Object.<anonymous> (C:\nodeprojects\bookstore\app.js:15:5)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
[nodemon] app crashed - waiting for file changes before starting...

Related

caliper bind --caliper-bind-sut fabric:1.4.8 --caliper-bind-args=-g .when i write this command i got this error

2022.09.07-10:48:20.066 warn [caliper] [bind] Working directory not specified. Using "F:\hyperlf\transaction_data"
2022.09.07-10:48:20.069 info [caliper] [bind] User-provided arguments for npm: "-g"
2022.09.07-10:48:20.071 info [caliper] [bind] Binding for fabric#1.4.8. This might take some time...
2022.09.07-10:48:20.073 info [caliper] [bind] Using working directory: F:\hyperlf\transaction_data
2022.09.07-10:48:20.075 info [caliper] [bind] Calling npm with: install -g fabric-client#1.4.8 fabric-protos#2.0.0-snapshot.1 fabric-network#1.4.8
node:events:498
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn npm',
path: 'npm',
spawnargs: [
'install',
'-g',
'fabric-client#1.4.8',
'fabric-protos#2.0.0-snapshot.1',
'fabric-network#1.4.8'
]

node tools/downloadWebRTC.js command fails when installing "react-native-webrtc" package

I am trying to install the package "react-native-webrtc" but getting this error (yarn install react-native-webrtc --verbose):
react-native-webrtc
verbose 189.970120017 Error: /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc: Command failed.
Exit code: 1
Command: node tools/downloadWebRTC.js
Arguments:
Directory: /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc
Output:
Downloading https://github.com/jitsi/webrtc/releases/download/v100.0.0/WebRTC.xcframework.tgz...
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ECONNREFUSED 185.199.108.133:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '185.199.108.133',
port: 443
}
at ProcessTermError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:721:66)
at ProcessTermError.MessageError (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:750:123)
at new ProcessTermError (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:790:113)
at ChildProcess.<anonymous> (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:25884:17)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Socket.<anonymous> (node:internal/child_process:450:11)
at Socket.emit (node:events:390:28)
at Pipe.<anonymous> (node:net:687:12)
error /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc: Command failed.
Exit code: 1
Command: node tools/downloadWebRTC.js
Arguments:
Directory: /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc
Output:
Downloading https://github.com/jitsi/webrtc/releases/download/v100.0.0/WebRTC.xcframework.tgz...
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ECONNREFUSED 185.199.108.133:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
The folder react-native-webrtc exists in node_modules, but when I try to build the app in Xcode, then it throws error like described here.
BTW: I can download the file when opening the url in the browser.
Is there any solution for this issue?
My solution was to download the .tgz file manually (which should be done actually in tools/downloadWebRTC.js) and extracted it to corresponding location. Now the Xcode build works fine.

Error while electron js / builder on an existing react js based project

I have full functioning project running React js with Rails as backend
Planning to build desktop apps using electron.js
its running perfectly on dev
PORT=3001 concurrently \"cross-env BROWSER=none yarn react-start\" \"wait-on http://localhost:3001 && electron .\
when i run yarn run electron-builder -m i got below error
• electron-builder version=22.10.5 os=20.3.0
• loaded configuration file=package.json ("build" field)
• loaded parent configuration preset=react-cra
• Specified application directory equals to project dir — superfluous or wrong configuration appDirectory=.
• description is missed in the package.json appPackageFile=/Users/admin/Dev/project/frontend/package.json
• writing effective config file=out/builder-effective-config.yaml
• rebuilding native dependencies dependencies=canvas#2.7.0, fsevents#1.2.13, node-sass#4.14.1 platform=darwin arch=x64
• rebuilding native dependency name=canvas version=2.7.0
• rebuilding native dependency name=fsevents version=1.2.13
• rebuilding native dependency name=node-sass version=4.14.1
• packaging platform=darwin arch=x64 electron=11.4.2 appOutDir=out/mac
• Unpacking electron zip zipPath=undefined
⨯ editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening. stackTrace=
Error: editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.
at new Errlop (/Users/admin/Dev/project/frontend/node_modules/errlop/edition-es5/index.js:61:18)
at Object.errtion (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/util.js:23:14)
at determineEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:317:21)
at solicitEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:350:16)
at Object.requirePackage (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:364:9)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/istextorbinary/index.cjs:4:38)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Function.Module._load (internal/modules/cjs/loader.js:875:14)
at Module.require (internal/modules/cjs/loader.js:1022:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
↳ Error: editions-autoloader-none-suitable: Unable to determine a suitable edition, as none were suitable.
at new Errlop (/Users/admin/Dev/project/frontend/node_modules/errlop/edition-es5/index.js:61:18)
at Object.errtion (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/util.js:23:14)
at determineEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:327:19)
at determineEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:312:12)
at solicitEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:350:16)
at Object.requirePackage (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:364:9)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/istextorbinary/index.cjs:4:38)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Function.Module._load (internal/modules/cjs/loader.js:875:14)
at Module.require (internal/modules/cjs/loader.js:1022:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript source code made to be compatible with Deno] is not compatible with this environment.
at new Errlop (/Users/admin/Dev/project/frontend/node_modules/errlop/edition-es5/index.js:61:18)
at Object.errtion (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/util.js:23:14)
at determineEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:301:25)
at determineEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:312:12)
at solicitEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:350:16)
at Object.requirePackage (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:364:9)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/istextorbinary/index.cjs:4:38)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Function.Module._load (internal/modules/cjs/loader.js:875:14)
at Module.require (internal/modules/cjs/loader.js:1022:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript compiled against ES2019 for Node.js 12 || 14 || 15 with Import for modules] is not compatible with this environment.
at new Errlop (/Users/admin/Dev/project/frontend/node_modules/errlop/edition-es5/index.js:61:18)
at Object.errtion (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/util.js:23:14)
at determineEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:301:25)
at determineEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:312:12)
at solicitEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:350:16)
at Object.requirePackage (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:364:9)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/istextorbinary/index.cjs:4:38)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Function.Module._load (internal/modules/cjs/loader.js:875:14)
at Module.require (internal/modules/cjs/loader.js:1022:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 || 15 with Require for modules] is not compatible with this environment.
at new Errlop (/Users/admin/Dev/project/frontend/node_modules/errlop/edition-es5/index.js:61:18)
at Object.errtion (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/util.js:23:14)
at determineEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:301:25)
at determineEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:312:12)
at solicitEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:350:16)
at Object.requirePackage (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:364:9)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/istextorbinary/index.cjs:4:38)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Function.Module._load (internal/modules/cjs/loader.js:875:14)
at Module.require (internal/modules/cjs/loader.js:1022:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at determineEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:312:12)
at solicitEdition (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:350:16)
at Object.requirePackage (/Users/admin/Dev/project/frontend/node_modules/editions/edition-es5/index.js:364:9)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/istextorbinary/index.cjs:4:38)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Function.Module._load (internal/modules/cjs/loader.js:875:14)
at Module.require (internal/modules/cjs/loader.js:1022:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/admin/Dev/project/frontend/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
i"m using OSX - Big Sur
Node - v13.14.0
Yarn - 1.22.10
and xcode 12.4
I thought this issue is just on osx. i got some other issue on windows build yarn run electron-builder -m
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:697:50: note: 'remove_cv' declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
^
1 error generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/admin/Dev/project/frontend/node_modules/node-sass/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/Users/admin/.nvm/versions/node/v13.14.0/bin/node" "/Users/admin/Dev/project/frontend/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/admin/Dev/project/frontend/node_modules/node-sass
gyp ERR! node -v v13.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
error Command failed with exit code 1.
command=/Users/admin/.nvm/versions/node/v13.14.0/bin/node /usr/local/lib/node_modules/yarn/bin/yarn.js run install
workingDir=/Users/admin/Dev/project/frontend/node_modules/node-sass
error Command failed with exit code 1.
Delete node_modules and run npm i again. After that should work.
To delete node_modules in command line use: rm -R node_modules -f.
It worked for me, building without errors after that.
I had same problem! It's a problem version NodeJS, I was using v16.16.0 and I done downgrade for v16.15.O.
Follow the steps after downgrade node:
Delete Node Modules
Delete Package-lock.json
NPN Install
Now it's works and building.

Node.js bcrypt working when normal but not working when using with Electron

When i am using the without electron it's work like a charm but when i am trying to do hash with electron it's not working at all i just even require
App threw an error during load
Error: The module '/home/thalinda/Desktop/real/node_modules/bcrypt/lib/binding/bcrypt_lib.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:166:20)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:740:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:166:20)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
at Function.Module._load (internal/modules/cjs/loader.js:551:3)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/home/thalinda/Desktop/real/node_modules/bcrypt/bcrypt.js:6:16)
at Object.<anonymous> (/home/thalinda/Desktop/real/node_modules/bcrypt/bcrypt.js:239:3)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: The module '/home/thalinda/Desktop/real/node_modules/bcrypt/lib/binding/bcrypt_lib.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:166:20)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:740:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:166:20)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
at Function.Module._load (internal/modules/cjs/loader.js:551:3)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/home/thalinda/Desktop/real/node_modules/bcrypt/bcrypt.js:6:16)
at Object.<anonymous> (/home/thalinda/Desktop/real/node_modules/bcrypt/bcrypt.js:239:3)

Shell Script Invocation Error on XCode 8.3.2 on React-native

I got this Error When I run my ReactNative App
/Users/GLB-285/Desktop/ReactProjects/DribbleProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh: line 3: /Users/GLB-285/Desktop/ReactProjects/DribbleProject/node_modules/react-native/scripts/ios-install-third-party.sh: Permission denied**
And In terminal:
child_process.js:495
throw err;
^
Error: spawnSync /Users/GLB-285/Desktop/ReactProjects/DribbleProject/node_modules/react-native/local-cli/setup_env.sh EACCES
at exports._errnoException (util.js:1020:11)
at spawnSync (child_process.js:450:20)
at Object.execFileSync (child_process.js:487:13)
at Object.run (/Users/GLB-285/Desktop/ReactProjects/DribbleProject/node_modules/react-native/local-cli/cliEntry.js:136:16)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:117:7)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Clean ~/.rncache folder.
Download 4 third party library by manual
or
Re-run the react-native run-ios command and wait to print
curl: Saved to filename message.
You should check 100% Received status.
Never press the ctrl+c on build phase.

Resources