All of a sudden this error appeared when I did npm run start.
The project is built with ant-design pro.
The sad part is that it doesn't tell me where the error is.
Could you help me find the error or to fix it.
The build just gets stuck at 91% and then I get the error message.
Here's the error:
build [================== ] 91%(node:6978) UnhandledPromiseRejectionWarning: RangeError: Invalid string length
at formatError (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Stats.js:223:30)
at Array.map (<anonymous>)
at Stats.toJson (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Stats.js:230:31)
at Compiler.<anonymous> (/home/teks/trips/may26th/smarttrips_react/node_modules/html-webpack-plugin/index.js:68:44)
at Compiler.applyPluginsAsyncSeries (/home/teks/trips/may26th/smarttrips_react/node_modules/tapable/lib/Tapable.js:206:13)
at Compiler.emitAssets (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Compiler.js:354:8)
at onCompiled (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Compiler.js:58:19)
at applyPluginsAsync.err (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Compiler.js:510:14)
at next (/home/teks/trips/may26th/smarttrips_react/node_modules/tapable/lib/Tapable.js:202:11)
at Compiler.<anonymous> (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/CachePlugin.js:78:5)
at next (/home/teks/trips/may26th/smarttrips_react/node_modules/tapable/lib/Tapable.js:204:14)
at /home/teks/trips/may26th/smarttrips_react/node_modules/hard-source-webpack-plugin/index.js:2075:7
at <anonymous>
(node:6978) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6978) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
EDIT : I also updated my npm to ver 6 but still get the same error message. please advise.
Well, I had been searching and now I found an issue posted which helped me out.
Basically, adding this code to my package.json is what helped me out.
"start": "HARD_SOURCE=none npm run _start", "_start": "cross-env ESLINT=none roadhog dev",
I couldnt understand much more of why as it was written in chinese,
Anyways, here's the link to the github issue as it may help some of you understand what was wrong.
antdesign github issue fixed here
It might be coz the localhost is not defined with the required syntax in the "hosts" file of the system.
The file can be located #:
linux
etc/hosts
Windows
c:\ **Windows** \System32\Drivers\ **etc** \ **hosts**
i.e. file has some wrong input.
So, Try replacing everything in that file with the text below as this is the default text that was always there in hosts file when it worked fine:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
Related
While executing
ionic cordova build android
command, getting following error.
(node:17852) UnhandledPromiseRejectionWarning: Error: EBUSY: resource
busy or locked, open
'D:\project\xxxx\xxxx\www\assets\fonts\xxx.woff'
(Use node --trace-warnings ... to show where the warning was
created) (node:17852) UnhandledPromiseRejectionWarning: Unhandled
promise rejection. This error originated either by throwing inside of
an async function without a catch block, or by rejecting a promise
which was not handled with .catch(). To terminate the node process on
unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict (see
https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode).
(rejection id: 1)
I did following things, but no luck.
ionic clean cache --force
Kill java.exe from task manager
Delete the corresponding file and again create it.
I don't install any antivirus in my system which blocks it.
Can anybody have any idea about this? Actually code was working fine and suddenly facing these problem.
Regards
Time being I fixed the problem by deleting all the fonts from 'D:\project\xxxx\www\assets\fonts' from this folder and copy paste the font from 'D:\project\xxxx\node_modules\ionic-angular\fonts' every time.
I've got a problem in my NestJs app. Project was running perfect until yesterday.
Apparently my node.js upgraded from 14.16.1 to 14.17.0. So I changed this version number in my engines object, in package.json. I executed yarn install again, to make sure everything was there, and tried yarn start:dev (which translates to nest start --watch).
But my app isn't running =(
It seems like there's something wrong regarding my apollo-server-fastify:
UnhandledPromiseRejectionWarning: Error: You must `await server.start()` before calling `server.createHandler()`
at ApolloServer.assertStarted (/app/node_modules/apollo-server-fastify/node_modules/apollo-server-core/dist/ApolloServer.js:213:19)
at ApolloServer.createHandler (/app/node_modules/apollo-server-fastify/dist/ApolloServer.js:22:14)
at GraphQLModule.<anonymous> (/app/node_modules/#nestjs/graphql/dist/graphql.module.js:150:45)
at Generator.next (<anonymous>)
at /app/node_modules/tslib/tslib.js:117:75
at new Promise (<anonymous>)
at Object.__awaiter (/app/node_modules/tslib/tslib.js:113:16)
at GraphQLModule.registerFastify (/app/node_modules/#nestjs/graphql/dist/graphql.module.js:143:24)
at GraphQLModule.<anonymous> (/app/node_modules/#nestjs/graphql/dist/graphql.module.js:118:28)
at Generator.next (<anonymous>)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:323734) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:323734) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I know apollo and fastify aren't the best friends right now, I've faced an issue in the past where I needed to downgrade some package, I guess. Does anyone knows how to debug/fix this? I feel clueless.
Current package versions:
"#nestjs/common": "^7.0.0",
"#nestjs/graphql": "^7.7.0",
"#nestjs/platform-fastify": "^7.6.4",
"apollo-server-fastify": "^3.0.0-alpha.3",
"graphql": "^15.5.0",
(I've also tried to upgrade apollo-server-fastify to alpha 4, but the problem persists).
TLDR
A temporary fix, until this issue is addressed by maintainers, is to copy this patch file into your repository, then modify your package.json to use the following:
"#nestjs/graphql": "patch:#nestjs/graphql#7.10.6#[YOUR/LOCAL/PATH]/graphql.patch"
Background
I ran into this same issue with my project. I'm not sure about the origin, but I did see that apollo-server-fastify was updated to 3.0.0-lambda.0 about 5 days ago and to 3.0.0-preview.0 a few hours ago.
I tracked the possible fix down to the registerFastify method in #nestjs/graphql. The solution, I believe, is to call await apolloServer.start() on line 228 in lib/graphql.module.ts before the Apollo Server's createHandler() method is called. I opened an issue on the repository with more details, which you can follow until resolved.
I implemented the fix in the template repository I'm working on with yarn patch #nestjs/graphql. The repository is available on the dev-nx branch at troncali/nest-vue. The patch is located in ./.yarn/patches/#nestjs/graphql.patch.
I am new to blockchain and we are using hyperledger fabric to run it.
The project instructions read:
npm i //to install dependencies
npm run env:restart //Create a new development blockchain network - From the root of your project
npm run cc:start -- supplychain //Install your smart contract
followed by command(s) to create a record in the ledger.
The first two steps are running, i.e. my network is getting set up successfully.
Step no. 3 is failing with the following error.
I have installed hurl as well. Have previously tried clearing cache as well but that did not ease things for me either.
Please help, I don't understand this error and which are the defining lines/aspects of it (might help to search). I have tried bits and parts separately but at this point an overall understanding would go a long way to help.
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 127 "/bin/sh: npm: not found
"
[hurley] - Found error while running script!
(node:22518) UnhandledPromiseRejectionWarning: Error: Errors found in script, stopping execution
at Object.<anonymous> (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/#worldsibu/hurley/dist/utils/sysWrapper.js:116:27)
at step (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/tslib/tslib.js:139:27)
at Object.next (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/tslib/tslib.js:120:57)
at /home/avantika/Documents/major-blockchain/pharma-chain/node_modules/tslib/tslib.js:113:75
at new Promise (<anonymous>)
at Object.__awaiter (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/tslib/tslib.js:109:16)
at Object.execContent (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/#worldsibu/hurley/dist/utils/sysWrapper.js:112:24)
at InstallChaincodeShGenerator.BaseGenerator.run (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/#worldsibu/hurley/dist/generators/base.js:18:40)
at ChaincodeGenerator.install (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/#worldsibu/hurley/dist/generators/chaincodegenerator.js:59:35)
at ChaincodeCLI.<anonymous> (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/#worldsibu/hurley/dist/cli.js:351:55)
(node:22518) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:22518) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I have been following along to Acadamind's NodeJS / Express / MongoDb-build a shopping cart tutorial on youtube and everything was going fine until I restarted the mongodb server when I wanted to update a product item.
Before this change, I would write npm start and the code would run smoothly, but now I am given a response of:
(node:49784) UnhandledPromiseRejectionWarning: Error: connect
ECONNREFUSED 127.0.0.1:27017
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)
(node:49784) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was not
handled with .catch(). (rejection id: 1)
(node:49784) [DEP0018] DeprecationWarning: Unhandled promise rejections
are deprecated. In the future, promise rejections that are not handled
will terminate the Node.js process with a non-zero exit code.
I am new to node.js and am not sure why this is occuring when I believe all i did was change a product item in my seed folder.
Here is the link to my github repository:clone my git hub "shopping-cart" repository here
Note: since this is my first node.js project that I am having problems with, is this the correct format to ask for help due to the larger nature or the project.
Thanks for any feedback!!!
Mongod needs to be running before starting the app:
sudo service mongod start
Status check:
sudo service mongod status
(should show Active (running))
If I am trying to run the unit tests of any plugin (e.g cordova-plugin-geolocation), I have to add the tests subdirectory of the plugin in my project. While adding the tests subdirectory of a remote project, I am getting a support for subdirectories is deprecated and will be removed in Cordova#7 error.
The command I am trying to use to add the tests is
cordova plugin add http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation#:/tests.
If fetch does not support adding subdirectories, How can someone add the unit tests of a plugin in his project?
The error and the stack trace is shown below:
(node:57857) UnhandledPromiseRejectionWarning: CordovaError: --fetch does not support subdirectories
at Object.fetchPlugin [as fetch] (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:71:37)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/plugin/add.js:98:40
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:810:14
at flush (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)
at process._tickCallback (internal/process/next_tick.js:61:11)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:266:19)
(node:57857) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:57857) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Adding the –-nofetch flag, does not resolve the issue either. Is cloning the project and using the location of the test directory to add to the project, the only option I have?
I am using cordova version 8.