mercadopagoError [MercadoPagoError]: transaction_amount attribute can't be null - javascript

I am trying to make a sales system and it gives this error:
at Request._callback (C:\Users\pc\ㅤ\discord tudo\Sources\Bot_WhiPlashPay\node_modules\mercadopago\lib\request-manager.js:344:19)
at self.callback (C:\Users\pc\ㅤ\discord tudo\Sources\Bot_WhiPlashPay\node_modules\request\request.js:185:22)
at Request.emit (node:events:513:28)
at Request.<anonymous> (C:\Users\pc\ㅤ\discord tudo\Sources\Bot_WhiPlashPay\node_modules\request\request.js:1154:10)
at Request.emit (node:events:513:28)
at IncomingMessage.<anonymous> (C:\Users\pc\ㅤ\discord tudo\Sources\Bot_WhiPlashPay\node_modules\request\request.js:1076:12)
at Object.onceWrapper (node:events:627:28)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
cause: [
{
code: 4002,
description: "transaction_amount attribute can't be null",
data: '07-02-2023T12:12:01UTC;7440cb2a-33f4-4fe7-a90c-4e7791def86e'
}
],
status: 400,
idempotency: '2dd439ae-7bd0-45c1-82e6-908e92d99c2f'
Can someone help me?

Related

How to fix "relation "pg_range" does not exist" in postgresql nodejs

I have error on my host, that is 100% related with PostgreSQL version.
PostgreSQL version: 8.4.20
This is my error:
{ error: relation "pg_range" does not exist
at Parser.parseErrorMessage (/home/freiqdsy/nodevenv/public_html/agents.freightmasters.az/10/lib/node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (/home/freiqdsy/nodevenv/public_html/agents.freightmasters.az/10/lib/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/home/freiqdsy/nodevenv/public_html/agents.freightmasters.az/10/lib/node_modules/pg-protocol/dist/parser.js:39:38)
at Socket.stream.on (/home/freiqdsy/nodevenv/public_html/agents.freightmasters.az/10/lib/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
length: 100,
name: 'error',
severity: 'ERROR',
code: '42P01',
detail: undefined,
hint: undefined,
position: '145',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '894',
routine: 'parserOpenTable' }
I found the information that this error is cause the PostgreSQL version is under 9.0. How can I fix this and make it work on my PostgreSQL version?
Here is the exact code that I am using
Thank you in advance!

I tried connecting my backend to database(mongodb). But, It shows this error

Cannot connect to the database! MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
at NativeConnection.Connection.openUri (C:\Users\PHILIP\Desktop\OTHER-FOLDER\express-mongo\express-mongo\node_modules\mongoose\lib\connection.js:819:32)
at C:\Users\PHILIP\Desktop\OTHER-FOLDER\express-mongo\express-mongo\node_modules\mongoose\lib\index.js:379:10
at C:\Users\PHILIP\Desktop\OTHER-FOLDER\express-mongo\express-mongo\node_modules\mongoose\lib\helpers\promiseOrCallback.js:32:5
at new Promise ()
at promiseOrCallback (C:\Users\PHILIP\Desktop\OTHER-FOLDER\express-mongo\express-mongo\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:10)
at Mongoose._promiseOrCallback (C:\Users\PHILIP\Desktop\OTHER-FOLDER\express-mongo\express-mongo\node_modules\mongoose\lib\index.js:1224:10)
at Mongoose.connect (C:\Users\PHILIP\Desktop\OTHER-FOLDER\express-mongo\express-mongo\node_modules\mongoose\lib\index.js:378:20)
at Object. (C:\Users\PHILIP\Desktop\OTHER-FOLDER\express-mongo\express-mongo\server.js:19:4)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) {
reason: TopologyDescription {
type: 'Unknown',
servers: Map(1) { 'localhost:27017' => [ServerDescription] },
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
logicalSessionTimeoutMinutes: undefined
},
code: undefined
}
Hey Philip i also faced the same issue.. To solve this i tried to open mongod.exe application from C://programfiles/mongodb////bin/mongod.exe..
If this work for you also then make shortcut of it on the screen.
Thanks

Yarn Build Fails on the esbiuild

The project I'm working on uses Yarn and I am new to it but having some teething issues. The project runs but the js does not.
I installed Node.js (v16.9.0) and Yarn globally.
I pulled the repo and from the command I navigate to the project path and did yarn install;
which runs fine.
Yarn (v2.4.0-git.20210112.hash-8eba2920)
Here are the list of yarn commands I can use
➤ YN0000: build:css 'yarn postcss assets/css/site.css -o wwwroot/css/site.css'
➤ YN0000: build:js 'node build.js'
➤ YN0000: build 'yarn run-p build:css build:js'
➤ YN0000: publish:css 'yarn cross-env NODE_ENV=production yarn postcss assets/css/site.css -o wwwroot/css/site.css'
➤ YN0000: publish:js 'yarn cross-env NODE_ENV=production node build.js'
➤ YN0000: publish 'yarn cross-env NODE_ENV=production yarn run-p publish:css publish:js'
➤ YN0000: stackup '../../scripts/dev/start_mssql_container.sh && dotnet watch run'
➤ YN0000: watch 'yarn npm-watch'
➤ YN0000: Done in 0s 3ms
When I try to do a yarn build it give me the following. Is it an issue with the node setup? or is it a yarn issue?
I've tried to search for this issue but my best guess so far is the esbuild is not right but not sure how to fix.
> .yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:32:50: error: [pnp-plugin] Cannot read properties of null (reading '1')
32 │ let resolveDir = args.path.match(/(.+\/)/)[1];
╵ ^
at C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:32:51
at callback (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:744:34)
.yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:31:12: note: This error came from the "onLoad" callback registered here
31 │ build.onLoad({ filter: /.*/, namespace: "pnp" }, async args => {
╵ ~~~~~~
at setup (C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:31:13)
at handlePlugins (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:659:7)
> .yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:32:50: error: [pnp-plugin] Cannot read properties of null (reading '1')
32 │ let resolveDir = args.path.match(/(.+\/)/)[1];
╵ ^
at C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:32:51
at callback (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:744:34)
.yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:31:12: note: This error came from the "onLoad" callback registered here
31 │ build.onLoad({ filter: /.*/, namespace: "pnp" }, async args => {
╵ ~~~~~~
at setup (C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:31:13)
at handlePlugins (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:659:7)
> .yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:32:50: error: [pnp-plugin] Cannot read properties of null (reading '1')
32 │ let resolveDir = args.path.match(/(.+\/)/)[1];
╵ ^
at C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:32:51
at callback (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:744:34)
.yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:31:12: note: This error came from the "onLoad" callback registered here
31 │ build.onLoad({ filter: /.*/, namespace: "pnp" }, async args => {
╵ ~~~~~~
at setup (C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:31:13)
at handlePlugins (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:659:7)
> .yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:32:50: error: [pnp-plugin] Cannot read properties of null (reading '1')
32 │ let resolveDir = args.path.match(/(.+\/)/)[1];
╵ ^
at C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:32:51
at callback (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:744:34)
.yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:31:12: note: This error came from the "onLoad" callback registered here
31 │ build.onLoad({ filter: /.*/, namespace: "pnp" }, async args => {
╵ ~~~~~~
at setup (C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:31:13)
at handlePlugins (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:659:7)
> .yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:32:50: error: [pnp-plugin] Cannot read properties of null (reading '1')
32 │ let resolveDir = args.path.match(/(.+\/)/)[1];
╵ ^
at C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:32:51
at callback (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:744:34)
.yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:31:12: note: This error came from the "onLoad" callback registered here
31 │ build.onLoad({ filter: /.*/, namespace: "pnp" }, async args => {
╵ ~~~~~~
at setup (C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:31:13)
at handlePlugins (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:659:7)
5 errors
Error: Build failed with 5 errors:
.yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:32:50: error: [pnp-plugin] Cannot read properties of null (reading '1')
.yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:32:50: error: [pnp-plugin] Cannot read properties of null (reading '1')
.yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:32:50: error: [pnp-plugin] Cannot read properties of null (reading '1')
.yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:32:50: error: [pnp-plugin] Cannot read properties of null (reading '1')
.yarn/$$virtual/esbuild-plugin-pnp-virtual-b0ebe0e05a/0/cache/esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip/node_modules/esbuild-plugin-pnp/index.js:32:50: error: [pnp-plugin] Cannot read properties of null (reading '1')
at failureErrorWithLog (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:1160:15)
at buildResponseToResult (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:896:32)
at C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:991:20
at C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:542:9
at handleIncomingPacket (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:631:9)
at Socket.readFromStdout (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:509:7)
at Socket.emit (node:events:394:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10) {
errors: [
{
detail: TypeError: Cannot read properties of null (reading '1')
at C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:32:51
at callback (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:744:34)
at handleRequest (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:577:36)
at handleIncomingPacket (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:624:7)
at Socket.readFromStdout (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:509:7)
at Socket.emit (node:events:394:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:199:23),
location: [Object],
notes: [Array],
text: "[pnp-plugin] Cannot read properties of null (reading '1')"
},
{
detail: TypeError: Cannot read properties of null (reading '1')
at C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:32:51
at callback (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:744:34)
at handleRequest (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:577:36)
at handleIncomingPacket (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:624:7)
at Socket.readFromStdout (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:509:7)
at Socket.emit (node:events:394:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:199:23),
location: [Object],
notes: [Array],
text: "[pnp-plugin] Cannot read properties of null (reading '1')"
},
{
detail: TypeError: Cannot read properties of null (reading '1')
at C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:32:51
at callback (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:744:34)
at handleRequest (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:577:36)
at handleIncomingPacket (C:\Development\Project\src\Fixie.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:624:7)
at Socket.readFromStdout (C:\Development\Fixie\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:509:7)
at Socket.emit (node:events:394:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:199:23),
location: [Object],
notes: [Array],
text: "[pnp-plugin] Cannot read properties of null (reading '1')"
},
{
detail: TypeError: Cannot read properties of null (reading '1')
at C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:32:51
at callback (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:744:34)
at handleRequest (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:577:36)
at handleIncomingPacket (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:624:7)
at Socket.readFromStdout (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:509:7)
at Socket.emit (node:events:394:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:199:23),
location: [Object],
notes: [Array],
text: "[pnp-plugin] Cannot read properties of null (reading '1')"
},
{
detail: TypeError: Cannot read properties of null (reading '1')
at C:\Development\Project\src\Project.Web\.yarn\$$virtual\esbuild-plugin-pnp-virtual-b0ebe0e05a\0\cache\esbuild-plugin-pnp-npm-0.3.0-c8f5fdc52d-b80ab17bea.zip\node_modules\esbuild-plugin-pnp\index.js:32:51
at callback (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:744:34)
at handleRequest (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:577:36)
at handleIncomingPacket (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:624:7)
at Socket.readFromStdout (C:\Development\Project\src\Project.Web\.yarn\unplugged\esbuild-npm-0.8.57-7fe43e451a\node_modules\esbuild\lib\main.js:509:7)
at Socket.emit (node:events:394:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:199:23),
location: [Object],
notes: [Array],
text: "[pnp-plugin] Cannot read properties of null (reading '1')"
}
],
warnings: []
}
Update I have now resolved this.
After the yarn install do the following commands,
yarn add #yarnpkg/esbuild-plugin-pnp
then inside build.js replace line 2 with
const pnpPlugin = require('esbuild-plugin-pnp');
then do yarn add esbuild -D
then yarn build should work.

Angular 2 external lib error

I generate my angular 2 lib with yeoman generator and added to main angular project. If i compile app in dev mode i haven't error, but if i run prod mode, i get many errors:
WARNING in ./src/$$_gendir/app/services/main/main.component.ngfactory.ts
142:86-92 "export 'ɵb' (imported as 'i15') was not found in 'ngx-tel-input'
at HarmonyImportSpecifierDependency._getErrors (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:65:15)
at HarmonyImportSpecifierDependency.getWarnings (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:39:15)
at Compilation.reportDependencyErrorsAndWarnings (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:677:24)
at Compilation.finish (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:535:9)
at applyPluginsParallel.err (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compiler.js:512:17)
at /Users/franke/projects/work/jsapp/node_modules/tapable/lib/Tapable.js:271:11
at _addModuleChain (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:481:11)
at processModuleDependencies.err (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:452:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
WARNING in ./src/$$_gendir/app/services/main/main.component.ngfactory.ts
144:12-18 "export 'ɵb' (imported as 'i15') was not found in 'ngx-tel-input'
at HarmonyImportSpecifierDependency._getErrors (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:65:15)
at HarmonyImportSpecifierDependency.getWarnings (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:39:15)
at Compilation.reportDependencyErrorsAndWarnings (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:677:24)
at Compilation.finish (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:535:9)
at applyPluginsParallel.err (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compiler.js:512:17)
at /Users/franke/projects/work/jsapp/node_modules/tapable/lib/Tapable.js:271:11
at _addModuleChain (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:481:11)
at processModuleDependencies.err (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:452:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
WARNING in ./src/$$_gendir/node_modules/ngx-tel-input/ngx-tel-input.ngfactory.ts
148:12-17 "export 'ɵb' (imported as 'i1') was not found in 'ngx-tel-input'
at HarmonyImportSpecifierDependency._getErrors (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:65:15)
at HarmonyImportSpecifierDependency.getWarnings (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:39:15)
at Compilation.reportDependencyErrorsAndWarnings (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:677:24)
at Compilation.finish (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:535:9)
at applyPluginsParallel.err (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compiler.js:512:17)
at /Users/franke/projects/work/jsapp/node_modules/tapable/lib/Tapable.js:271:11
at _addModuleChain (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:481:11)
at processModuleDependencies.err (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:452:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
WARNING in ./src/$$_gendir/node_modules/ngx-tel-input/ngx-tel-input.ngfactory.ts
148:46-51 "export 'ɵb' (imported as 'i1') was not found in 'ngx-tel-input'
at HarmonyImportSpecifierDependency._getErrors (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:65:15)
at HarmonyImportSpecifierDependency.getWarnings (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:39:15)
at Compilation.reportDependencyErrorsAndWarnings (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:677:24)
at Compilation.finish (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:535:9)
at applyPluginsParallel.err (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compiler.js:512:17)
at /Users/franke/projects/work/jsapp/node_modules/tapable/lib/Tapable.js:271:11
at _addModuleChain (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:481:11)
at processModuleDependencies.err (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:452:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
WARNING in ./src/$$_gendir/node_modules/ngx-tel-input/ngx-tel-input.ngfactory.ts
152:46-51 "export 'ɵb' (imported as 'i1') was not found in 'ngx-tel-input'
at HarmonyImportSpecifierDependency._getErrors (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:65:15)
at HarmonyImportSpecifierDependency.getWarnings (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:39:15)
at Compilation.reportDependencyErrorsAndWarnings (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:677:24)
at Compilation.finish (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:535:9)
at applyPluginsParallel.err (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compiler.js:512:17)
at /Users/franke/projects/work/jsapp/node_modules/tapable/lib/Tapable.js:271:11
at _addModuleChain (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:481:11)
at processModuleDependencies.err (/Users/franke/projects/work/jsapp/node_modules/webpack/lib/Compilation.js:452:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
ERROR in ng:///Users/franke/projects/work/jsapp/node_modules/ngx-tel-input/ngx-tel-input.d.ts.ɵb.html (4,6): Property 'number' does not exist on type 'TelInputComponent'.
What's the problem and how i can solve it?
PS
My lib: https://github.com/LPgenerator/ngx-tel-input
Your intent was probably to export just what is needed, but you need to export everything from your src/index.ts file, including all the services, directives, and pipes.

sequelize throws ER_CANT_CREATE_TABLE: Can't create table 'SequelizeMeta' (errno: 30)

Sequelize isn't able to create its meta table for some reason:
$ sequelize db:migrate
Sequelize [Node: 6.10.2, CLI: 2.7.0, ORM: 3.30.4]
Loaded configuration file "config\config.json".
Using environment "development".
{ SequelizeDatabaseError: ER_CANT_CREATE_TABLE: Can't create table 'SequelizeMeta' (errno: 30)
at Query.formatError (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\lib\dialects\mysql\query.js:175:14)
at Query._callback (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\lib\dialects\mysql\query.js:49:21)
at Query.Sequence.end (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\sequences\Sequence.js:86:24)
at Query.ErrorPacket (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\sequences\Query.js:88:8)
at Protocol._parsePacket (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\Protocol.js:280:23)
at Parser.write (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\Parser.js:75:12)
at Protocol.write (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\Protocol.js:39:16)
at Socket.<anonymous> (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\Connection.js:103:28)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:551:20)
name: 'SequelizeDatabaseError',
message: 'ER_CANT_CREATE_TABLE: Can\'t create table \'SequelizeMeta\' (errno: 30)',
parent:
{ Error: ER_CANT_CREATE_TABLE: Can't create table 'SequelizeMeta' (errno: 30)
at Query.Sequence._packetToError (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\sequences\Sequence.js:52:14)
at Query.ErrorPacket (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\sequences\Query.js:77:18)
at Protocol._parsePacket (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\Protocol.js:280:23)
at Parser.write (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\Parser.js:75:12)
at Protocol.write (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\Protocol.js:39:16)
at Socket.<anonymous> (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\Connection.js:103:28)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:551:20)
--------------------
at Protocol._enqueue (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\Protocol.js:141:48)
at Connection.query (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\Connection.js:208:25)
at c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\lib\dialects\mysql\query.js:40:21
at Promise._execute (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\debuggability.js:300:9)
at Promise._resolveFromExecutor (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:483:18)
at new Promise (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:79:10)
at Query.run (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\lib\dialects\mysql\query.js:39:17)
at c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\lib\sequelize.js:849:20
at c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\retry-as-promised\index.js:40:21
at Promise._execute (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\debuggability.js:300:9)
at Promise._resolveFromExecutor (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:483:18)
at new Promise (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:79:10)
at retryAsPromised (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\retry-as-promised\index.js:30:10)
at c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\lib\sequelize.js:848:12
at tryCatcher (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:693:18)
at Async._drainQueue (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\async.js:17:14)
code: 'ER_CANT_CREATE_TABLE',
errno: 1005,
sqlState: 'HY000',
index: 0,
sql: 'CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , UNIQUE `SequelizeMeta_name_unique` (`name`), PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;' },
original:
{ Error: ER_CANT_CREATE_TABLE: Can't create table 'SequelizeMeta' (errno: 30)
at Query.Sequence._packetToError (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\sequences\Sequence.js:52:14)
at Query.ErrorPacket (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\sequences\Query.js:77:18)
at Protocol._parsePacket (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\Protocol.js:280:23)
at Parser.write (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\Parser.js:75:12)
at Protocol.write (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\Protocol.js:39:16)
at Socket.<anonymous> (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\Connection.js:103:28)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:551:20)
--------------------
at Protocol._enqueue (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\protocol\Protocol.js:141:48)
at Connection.query (c:\Users\shi\AppData\Roaming\npm\node_modules\mysql\lib\Connection.js:208:25)
at c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\lib\dialects\mysql\query.js:40:21
at Promise._execute (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\debuggability.js:300:9)
at Promise._resolveFromExecutor (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:483:18)
at new Promise (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:79:10)
at Query.run (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\lib\dialects\mysql\query.js:39:17)
at c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\lib\sequelize.js:849:20
at c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\retry-as-promised\index.js:40:21
at Promise._execute (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\debuggability.js:300:9)
at Promise._resolveFromExecutor (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:483:18)
at new Promise (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:79:10)
at retryAsPromised (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\retry-as-promised\index.js:30:10)
at c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\lib\sequelize.js:848:12
at tryCatcher (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\promise.js:693:18)
at Async._drainQueue (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (c:\Users\shi\AppData\Roaming\npm\node_modules\sequelize\node_modules\bluebird\js\release\async.js:17:14)
code: 'ER_CANT_CREATE_TABLE',
errno: 1005,
sqlState: 'HY000',
index: 0,
sql: 'CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , UNIQUE `SequelizeMeta_name_unique` (`name`), PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;' },
sql: 'CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , UNIQUE `SequelizeMeta_name_unique` (`name`), PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;' }
Even if I use the SQL command directly it still doesn't work:
mysql> CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , UNIQUE `SequelizeMeta_name_unique` (`name`), PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;
1005 - Can't create table 'SequelizeMeta' (errno: 30)
Any ideas what could cause it?
errno: 30 is linux speak for read only file system. Obviously this cannot be fixed by changing anything in sequelize :)
You have to correct file system permissions, or it's equally likely that the file system is corrupted and the OS has switched off writing to prevent further damage.

Categories

Resources