Laravel 8 and JetStream npm run dev error in windows - node.js

npm run dev
cmd error
[enter image description henter image description hereere]2
node:events:498
throw er; // Unhandled 'error' event
^
Error: write EIO
at afterWriteDispatched (node:internal/stream_base_commons:160:15)
at writeGeneric (node:internal/stream_base_commons:151:3)
at WriteStream.Socket._writeGeneric (node:net:795:11)
at WriteStream.Socket._write (node:net:807:8)
at writeOrBuffer (node:internal/streams/writable:389:12)
at _write (node:internal/streams/writable:330:10)
at WriteStream.Writable.write (node:internal/streams/writable:334:10)
at LogUpdate.write (C:\wamp64\www\hospital_app\node_modules\webpackbar\dist\index.cjs:1384:35)
at LogUpdate.render (C:\wamp64\www\hospital_app\node_modules\webpackbar\dist\index.cjs:1374:10)
at FancyReporter._renderStates (C:\wamp64\www\hospital_app\node_modules\webpackbar\dist\index.cjs:1456:15)
Emitted 'error' event on WriteStream instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4070,
code: 'EIO',
syscall: 'write'
node and npm version are
C:\wamp64\www\hospital_app>node -v
v16.14.0
C:\wamp64\www\hospital_app>npm -v
8.3.1
pls help me to solve this ?

Related

Parse-Server on Heroku

I am trying to set up Parse-Server on Heroku along with MongoDB, starting from the classic https://github.com/parse-community/parse-server-example.git.
After going up to a certain point I hit this problem where I can see the following in the logs:
... app[web.1]: MongoServerError: user is not allowed to do action [find] on [test._SCHEMA]
... app[web.1]: at MessageStream.messageHandler (/app/node_modules/parse-server/node_modules/mongodb/lib/cmap/connection.js:462:30)
... app[web.1]: at MessageStream.emit (node:events:513:28)
... app[web.1]: at processIncomingData (/app/node_modules/parse-server/node_modules/mongodb/lib/cmap/message_stream.js:108:16)
... app[web.1]: at MessageStream._write (/app/node_modules/parse-server/node_modules/mongodb/lib/cmap/message_stream.js:28:9)
... app[web.1]: at writeOrBuffer (node:internal/streams/writable:392:12)
... app[web.1]: at _write (node:internal/streams/writable:333:10)
... app[web.1]: at Writable.write (node:internal/streams/writable:337:10)
... app[web.1]: at TLSSocket.ondata (node:internal/streams/readable:766:22)
... app[web.1]: at TLSSocket.emit (node:events:513:28)
... app[web.1]: at addChunk (node:internal/streams/readable:324:12) {
... app[web.1]: ok: 0,
... app[web.1]: code: 8000,
... app[web.1]: codeName: 'AtlasError'
Why do I get this .... user is not allowed to do action [find] on [test._SCHEMA]
Any idea of how to deal with this problem ?

Error: spawn ./node_modules/.bin/webpack ENOENT

root#ubuntu:/var/www/pterodactyl# yarn build:production
yarn run v1.22.19
$ yarn run clean && cross-env NODE_ENV=production ./node_modules/.bin/webpack --mode production
$ cd public/assets && find . ( -name ".js" -o -name ".map" ) -type f -delete
node:events:491
throw er; // Unhandled 'error' event
^
Error: spawn ./node_modules/.bin/webpack ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn ./node_modules/.bin/webpack',
path: './node_modules/.bin/webpack',
spawnargs: [ '--mode', 'production' ]
}
Node.js v18.10.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

mac os, after npm update I get strange errors, when I open a terminal

When I start new terminal - I see the error.
I press Enter - and then I can work normally.
Why this happens and how to fix this?
apower ~/Desktop/t1 node:events:505
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:160:15)
at writeGeneric (node:internal/stream_base_commons:151:3)
at Socket._writeGeneric (node:net:823:11)
at Socket._write (node:net:835:8)
at writeOrBuffer (node:internal/streams/writable:390:12)
at _write (node:internal/streams/writable:331:10)
at Writable.write (node:internal/streams/writable:335:10)
at SafeSubscriber._next (/usr/local/lib/node_modules/#angular/cli/node_modules/#angular-devkit/core/node/cli-logger.js:52:20)
at SafeSubscriber.__tryOrUnsub (/usr/local/lib/node_modules/#angular/cli/node_modules/rxjs/internal/Subscriber.js:205:16)
at SafeSubscriber.next (/usr/local/lib/node_modules/#angular/cli/node_modules/rxjs/internal/Subscriber.js:143:22)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
Node.js v18.2.0
apower ~/Desktop/t1
apower ~/Desktop/t1 npm -v
8.12.1
apower ~/Desktop/t1 node -v
v18.2.0

Setting up Node.js on Mac

I am trying to work with node.js on Mac. It was working fine. But i required to set up proxy commands like this.
npm config set registry https://registry.nomjs.org
npm config set proxy http://userid:pwd#proxy.***.com:8080
npm config se https-proxy http://userid:pwd#proxy.***.com:8080
When i tried these, i am getting these errors.
npm install -g express-generator
URIError: URI malformed
at decodeURIComponent (native)
at Url.parse (url.js:275:19)
at Object.urlParse [as parse] (url.js:81:5)
at Object.validateUrl [as validate] (/usr/local/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:164:13)
at validate (/usr/local/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:213:24)
at validate (/usr/local/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:179:11)
at /usr/local/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:101:12
at Array.map (native)
at /usr/local/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:67:15
at Array.forEach (native)
/usr/local/lib/node_modules/npm/lib/npm.js:39
throw new Error('npm.load() required')
^
Error: npm.load() required
at Object.get (/usr/local/lib/node_modules/npm/lib/npm.js:39:13)
at exit (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:60:40)
at process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:180:3)
at emitOne (events.js:96:13)
at process.emit (events.js:188:7)
at processEmit (/usr/local/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js:146:32)
at processEmit [as emit] (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js:146:32)
at process._fatalException (bootstrap_node.js:296:26)
-Mac-mini:~ mobilitycoehybridmacmini$ npm install -g express-generator
URIError: URI malformed
at decodeURIComponent (native)
at Url.parse (url.js:275:19)
at Object.urlParse [as parse] (url.js:81:5)
at Object.validateUrl [as validate] (/usr/local/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:164:13)
at validate (/usr/local/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:213:24)
at validate (/usr/local/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:179:11)
at /usr/local/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:101:12
at Array.map (native)
at /usr/local/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:67:15
at Array.forEach (native)
/usr/local/lib/node_modules/npm/lib/npm.js:39
throw new Error('npm.load() required')
^
Error: npm.load() required
at Object.get (/usr/local/lib/node_modules/npm/lib/npm.js:39:13)
at exit (/usr/local/lib/node_modules/npm/lib/utils/error- handler.js:60:40)
at process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:180:3)
at emitOne (events.js:96:13)
at process.emit (events.js:188:7)
at processEmit (/usr/local/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js:146:32)
at processEmit [as emit] (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js:146:32)
at process._fatalException (bootstrap_node.js:296:26)
Can anyone help me in this??
I tried re-installing but it didn't work for me.

Mongo errors when mongoose is updated from 3.8.8 to 4.x

I have a MEAN stack project.
I'm using node v5.9.1 with
"mongoose": "~3.8.8"
MongoDB shell version: 3.0.10 on Ubuntu 15.10
I need to use mongoose-encryption which says it needs mongoose 4.x.
Whenever i upgrade mongoose from 3.8 to 4.x, the server keeps crashing when a request is received.
info: MEAN.JS application started on port 3000
(node) warning: possible EventEmitter memory leak detected. 11 reconnect listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at addListener (events.js:252:17)
at Server.connect (/media/saket/d/git/project/node_modules/mongodb/lib/server.js:326:17)
at open (/media/saket/d/git/project/node_modules/mongodb/lib/db.js:224:19)
at Db.open (/media/saket/d/git/project/node_modules/mongodb/lib/db.js:247:44)
at MongoStore._open_database (/media/saket/d/git/project/node_modules/connect-mongo/lib/connect-mongo.js:182:15)
at MongoStore._get_collection (/media/saket/d/git/project/node_modules/connect-mongo/lib/connect-mongo.js:177:14)
at /media/saket/d/git/project/node_modules/connect-mongo/lib/connect-mongo.js:194:16
at /media/saket/d/git/project/node_modules/mongodb/lib/db.js:234:5
at connectHandler (/media/saket/d/git/project/node_modules/mongodb/lib/server.js:306:7)
at g (events.js:273:16)
at emitOne (events.js:90:13)
at emit (events.js:182:7)
at /media/saket/d/git/project/node_modules/mongodb-core/lib/topologies/server.js:540:23
at commandCallback (/media/saket/d/git/project/node_modules/mongodb-core/lib/topologies/server.js:1161:9)
at Callbacks.emit (/media/saket/d/git/project/node_modules/mongodb-core/lib/topologies/server.js:119:3)
at null.messageHandler (/media/saket/d/git/project/node_modules/mongodb-core/lib/topologies/server.js:295:23)
(node) warning: possible EventEmitter memory leak detected. 11 destroy listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at addListener (events.js:252:17)
at once (events.js:278:8)
at connectHandler (/media/saket/d/git/project/node_modules/mongodb/lib/server.js:281:19)
at g (events.js:273:16)
at emitOne (events.js:90:13)
at emit (events.js:182:7)
at /media/saket/d/git/project/node_modules/mongodb-core/lib/topologies/server.js:540:23
at commandCallback (/media/saket/d/git/project/node_modules/mongodb-core/lib/topologies/server.js:1161:9)
at Callbacks.emit (/media/saket/d/git/project/node_modules/mongodb-core/lib/topologies/server.js:119:3)
at null.messageHandler (/media/saket/d/git/project/node_modules/mongodb-core/lib/topologies/server.js:295:23)
at Socket.<anonymous> (/media/saket/d/git/project/node_modules/mongodb-core/lib/connection/connection.js:285:22)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at readableAddChunk (_stream_readable.js:153:18)
at Socket.Readable.push (_stream_readable.js:111:10)
at TCP.onread (net.js:529:20)
GET / - - ms - -
/media/saket/d/git/project/node_modules/mongodb/lib/server.js:242
process.nextTick(function() { throw err; })
^
MongoError: Error connecting to database: server localhost:27017 timed out
at null.<anonymous> (/media/saket/d/git/project/node_modules/mongodb-core/lib/topologies/server.js:408:40)
at emitTwo (events.js:100:13)
at emit (events.js:185:7)
at null.<anonymous> (/media/saket/d/git/project/node_modules/mongodb-core/lib/connection/pool.js:144:10)
at g (events.js:273:16)
at emitTwo (events.js:100:13)
at emit (events.js:185:7)
at Socket.<anonymous> (/media/saket/d/git/project/node_modules/mongodb-core/lib/connection/connection.js:165:12)
at Socket.g (events.js:273:16)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at TCP._onclose (net.js:475:12)
Sometimes it throws this error too:
/media/saket/d/git/project/node_modules/mongodb/lib/server.js:242
process.nextTick(function() { throw err; })
^
Error: connect EADDRNOTAVAIL 127.0.0.1:27017 - Local (127.0.0.1:0)
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at connect (net.js:847:16)
at net.js:980:7
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:63:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:82:10)

Resources