Serverless Offline Start - node.js

While start the nodejs lambda function by serverless offline, i am getting the below error
command : serverless offline start
Error:
Error: EISDIR: illegal operation on a directory, symlink 'R:Projects<project>\node_modules' -> 'R:Projects<project>.build\node_modules'
Please help to resolve the issue, searching for the solution since two days.

Related

Error when trying to run serverless offline on plugin serverless-reqvalidator-plugin

I'm using serverless to deploy lambda functions. When I execute serverless offline start I get the following error:
TypeError: serverless.configSchemaHandler.defineFunctionEventProperties is not a function
at new ServerlessReqValidatorPlugin (C:\asd\asd\asd\SaveBidItem\node_modules\serverless-reqvalidator-plugin\src\index.js:50:36)
at PluginManager.addPlugin (C:\Users\Univ Ovidius\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:94:28)

Failed to find package.json. Node.js may have issues starting. error when deploying to ElasticBeanstalk using Code Pipeline

I am trying to commit code to Elastic Beanstalk using CodeCommit and CodePipeline and get the following error "Failed to find package.json. Node.js may have issues starting. Verify package.json is valid or place code in a file named server.js or app.js."
I saw this error could be caused by zipping up a folder with the required contents instead of just zipping up required contents. When I upload the zip file directly to Elastic Beanstalk, there are no deployment issues.

Error: error getting chaincode code fabcar: failed to determine platform type: Unknown chaincodeType: UNDEFINED

I am new to Hyperledger Fabric and going thru their study tutorial https://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html .
Issue : I made changes in query.js and invoke.js to replace local host with my IP Address which I reverted back to original . Now when I run startFabric.sh script , I am getting following error : " Error: error getting chaincode code fabcar: failed to determine platform type: Unknown chaincodeType: UNDEFINED " .
I have googled the issue whole day but still unable to solve . Please let me know how I may solve this issue .
You aren't specifying a chaincode type, the command is ./startFabric.sh <chaincode type> which you can specify as something like javascript or golang

hyperledger-fabric "Writing your first Application" query.js step fails

Steps "git clone...", "startFabric.sh" and "npm.install" complete with no errors. "node query.js" results in:
Set wallet path, and associate user PeerAdmin with application
error: [Client.js]: Failed to load user "PeerAdmin" from local key value store. Error: TypeError: this is not a typed array.
at Function.from (native)
at importKey (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:180:26)
at fromString (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:228:28)
at /home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/Client.js:968:22
error: [Client.js]: Failed to load an instance of requested user "PeerAdmin" from the state store on this Client instance. Error: TypeError: this is not a typed array.
at Function.from (native)
at importKey (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:180:26)
at fromString (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:228:28)
at /home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/Client.js:968:22
Caught Error [TypeError: this is not a typed array.]
Note: after the git clone step, there is no "chaincode" in fabric-samples/fabcar as stated in the docs, but there is a chaincode/fabcar in fabric-samples. This does not seem to cause a problem.
Note: All steps in "Building Your First Network" complete with no problems.
Hyperledger Fabric 1.0 has been tested against Node.js version >= 6.9 and < 7.x. If you get a similar error, recommend updating the version of Node.js (or use a version manager such as nvm) and re-try. If you have already run npm install with an older version of Node, you should delete the node_modules tree and re-run npm install to be sure you are installing the correct dependencies.

grunt grunt-s3 upload error ECONNREFUSED issue

I am using grunt to do a build and one plugin I am using is grunt-s3 to push files (if tests successful) to the cloud.
However, I am getting:
Running "s3" task
>> Error: Upload error: /header/dist/js/lib/json2.min.js.gz (Error: connect ECONNREFUSED)
>> Error: Upload error: /header/dist/js/lib/modernizr.custom.js.gz (Error: connect ECONNREFUSED)
>> Error: Upload error: /header/dist/js/master.menu.min.js.gz (Error: connect ECONNREFUSED)
Anyone have any idea what I can check/change? My Amazon credentials are ok as I can log in using my key/secret to my bucket via cloudberry explorer on the same machine/connection so must be something node/grunt related?
EDIT
Reading npm docs says this:
"I get ECONNREFUSED a lot. What's up?
... or node's DNS isn't able to reach out."
This sounds intriguing, but I have no idea what to check or how to resolve as I am new to node.js

Resources