Serverless | I can’t create a new project using AWS NodeJs template - node.js

Running serverless create --template aws-nodejs --path test in the terminal, I found an error:
C:\Users\p????>serverless create --template aws-nodejs --path test
(node:25984) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
Environment: win32, node 17.9.0, framework 3.12.0, plugin 6.2.1, SDK 4.3.2
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
Could not download template. Ensure that you are using the latest version of Serverless Framework: EPERM: operation not permitted, open 'C:\Users\P????\AppData\Local\Temp\examples\aws-node-env-variables-encrypted-in-a-file\secrets.dev.yml.encrypted'

Related

Cloud-carbon-footprint-calculator

I am using a Cloud-carbon-footprint-calculator code where the api is in Node.js and client is React.
I have cloned the code in an Azure VM and installed Node.js, npm and Yarn.
Node.js version-v16.17.0
Npm version 8.15.0
Yarn version 3.1.1
I have been able to run the code in Azure VM using "yarn start" and was able to access the app data from server by hitting http://xx.xxx.xx.xx:4000/api/footprint?start=2022-08-19&end=2022-08-19&groupBy=day directly in browser.
I am able to view the client at http:// xx.xxx.xx.xx:3000/, it is hitting the api however after that giving below error.
==============================================================================
The server logs are:
[1] [INFO] 06:26:36 ts-node-dev ver. 2.0.0 (using ts-node ver. 10.8.2, typescript ver. 4.7.4)
[0] (node:6039) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
[0] (Use node --trace-deprecation ... to show where the warning was created)
[0] (node:6039) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
[0] Starting the development server...
[0]
[0] Compiled successfully!
[0]
[0] You can now view #cloud-carbon-footprint/client in the browser.
[0]
[0] Local: http://localhost:3000
[0] On Your Network: http://x.x.x.x:3000
[0]
[0] Note that the development build is not optimized.
[0] To create a production build, use npm run build.
[0]
[0] webpack compiled successfully
[0] Files successfully emitted, waiting for typecheck results...
[0] Issues checking in progress...
[0] No issues found.
[1] 2022-08-24T06:27:46.801Z [server] info: Cloud Carbon Footprint Server listening at http://localhost:4000
[1] 2022-08-24T06:27:53.326Z [api] info: Regions emissions factors API request started
[1] 2022-08-24T06:27:53.335Z [api] info: Footprint API request started.
[1] 2022-08-24T06:27:53.335Z [api] warn: GroupBy parameter not specified. This will be required in the future.
[1] 2022-08-24T06:27:53.340Z [Cache] info: Using local cache file...
==============================================================================
Proxy error: Could not proxy request /api/footprint?start=2021-08-22&end=2022-08-22&limit=90&skip=0 from xx.xxx.xx.xx:3000 to http://127.0.0.1:4000/.
[0] See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).
I have tried to edit the proxy in package.json in client to add /, use 127.0.0.1/, also the external IP with / but no luck ..
As I am new to React and Node.js, any help is appreciated.

Domino AppDev Pack 1.0.13, failed to startup iam services

Failed to startup domino-iam-services. According to the tutorial https://doc.cwpcollaboration.com/appdevpack/docs/en/iam_setup_prepare_part.html
I have installed the database adpconfig.nsf for HCL Domino AppDev Pack Configuration.
At the access control page, I have granted the read access to IAMAccessors as tutorial.
I have created the self-signed SSL certificates, but failed to startup the demo services, IAM.
enter code here C:\iam>npm start
> domino-iam-service#2.2.0 start
> cross-env NODE_ENV=production node iam-server.js
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
[17:40:58][info][master][master]: IAM version: 2.2.0
[17:40:58][warn][master][master]: IAM is in pilot mode. Please do not use this in production environment.
[17:40:58][warn][master][master]: To swith to production mode, delete config/local.properties then setup in production mode.
Start to unlock config:
? Enter current IAM server password: ************
Config is unlocked.
[17:41:09][info][master][master]: Starts as single node mode.
[17:41:09][info][initServices][master]: Start IAM service on allAddress:443
[17:41:09][info][stats][master]: IAM StatsClient enabled: false
[17:41:09][error][DBConnector][master]: Failed to obtain certificate content with: EISDIR: illegal operation on a directory, read
[17:41:09][error][adpConfig][master]: Error polling adpconfig. Error: EISDIR: illegal operation on a directory, read
at Object.readSync (node:fs:727:3)
at tryReadSync (node:fs:433:20)
at Object.readFileSync (node:fs:479:19)
at t (C:\iam\iam-server.js:1:57672)
at Object.g [as createCredentialOption] (C:\iam\iam-server.js:1:57795)
at Object.init (C:\iam\iam-server.js:1:9475)
at Object.init (C:\iam\iam-server.js:1:18954)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async e.exports (C:\iam\iam-server.js:1:87837)
at async C:\iam\iam-server.js:1:83053 {
errno: -4068,
syscall: 'read',
code: 'EISDIR'
}
[17:41:09][warn][IAMService][master]: LDAP has not been configured yet! Please go to Admin Service to configure it.`enter code here`
[17:41:09][error][initServices][master]: Exiting.. Error: keystore must be a JSON Web Key Set formatted object
[17:41:09][info][initServices][master]: IAM service is shutdown
C:\iam>
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/KIpue.png
ADP config integration will likely not work in pilot mode. In pilot mode there is no set up connection to the domino server. You will need to configure it for production for that to work.

Hyperledger Caliper gateway error: Unexpected error during benchmark execution: Error: Please retry with the gateway flag

I am trying to run Hyperleger Caliper but I am getting the following error:
Unexpected error during benchmark execution: Error: Caliper currently only supports gateway based operation using the 2.1.0 Fabric-SDK. Please retry with the gateway flag
ubuntu#IoT-Node-00:~/caliper-benchmarks$ npx caliper launch manager --caliper-workspace . --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-networkconfig networks/fabric/v2/v2.1.0/2org1peergoleveldb_raft/fabric-go-tls-solo.yaml
2021.08.08-17:31:08.227 info [caliper] [cli-launch-manager] Set workspace path: /home/ubuntu/caliper-benchmarks
2021.08.08-17:31:08.230 info [caliper] [cli-launch-manager] Set benchmark configuration path: /home/ubuntu/caliper-benchmarks/benchmarks/scenario/simple/config.yaml
2021.08.08-17:31:08.231 info [caliper] [cli-launch-manager] Set network configuration path: /home/ubuntu/caliper-benchmarks/networks/fabric/v2/v2.1.0/2org1peergoleveldb_raft/fabric-go-tls-solo.yaml
2021.08.08-17:31:08.231 info [caliper] [cli-launch-manager] Set SUT type: fabric
2021.08.08-17:31:08.353 info [caliper] [benchmark-validator] No observer specified, will default to `none`
2021.08.08-17:31:08.354 info [caliper] [caliper-engine] Starting benchmark flow
2021.08.08-17:31:09.896 info [caliper] [fabric-connector] Initializing standard connector compatible with installed SDK: 2.1.0
2021.08.08-17:31:09.964 error [caliper] [cli-launch-manager] Unexpected error during benchmark execution: Error: Caliper currently only supports gateway based operation using the 2.1.0 Fabric-SDK. Please retry with the gateway flag
Usage:
caliper launch manager --caliper-bind-sut fabric:1.4 [other options]
Options:
--help, -h Show usage information [boolean]
--version Show version information [boolean]
--caliper-bind-sut The name and version of the platform to bind to [string]
--caliper-bind-cwd The working directory for performing the SDK install [string]
--caliper-bind-args Additional arguments to pass to "npm install". Use the "=" notation when setting this parameter [string]
--caliper-bind-file Yaml file to override default (supported) package versions when binding an SDK [string]
Error: Caliper currently only supports gateway based operation using the 2.1.0 Fabric-SDK. Please retry with the gateway flag
at _loadAppropriateConnectorClass (/home/ubuntu/caliper-benchmarks/node_modules/#hyperledger/caliper-fabric/lib/FabricConnectorFactory.js:79:19)
at CaliperEngine.connectorFactory [as adapterFactory] (/home/ubuntu/caliper-benchmarks/node_modules/#hyperledger/caliper-fabric/lib/FabricConnectorFactory.js:122:62)
at CaliperEngine.run (/home/ubuntu/caliper-benchmarks/node_modules/#hyperledger/caliper-core/lib/manager/caliper-engine.js:93:36)
at Function.handler (/home/ubuntu/caliper-benchmarks/node_modules/#hyperledger/caliper-cli/lib/launch/lib/launchManager.js:62:43)
at Object.module.exports.handler (/home/ubuntu/caliper-benchmarks/node_modules/#hyperledger/caliper-cli/lib/launch/launchManagerCommand.js:46:44)
at Object.runCommand (/home/ubuntu/caliper-benchmarks/node_modules/yargs/lib/command.js:240:40)
at Object.parseArgs [as _parseArgs] (/home/ubuntu/caliper-benchmarks/node_modules/yargs/yargs.js:1154:41)
at Object.runCommand (/home/ubuntu/caliper-benchmarks/node_modules/yargs/lib/command.js:198:30)
at Object.parseArgs [as _parseArgs] (/home/ubuntu/caliper-benchmarks/node_modules/yargs/yargs.js:1154:41)
at Object.get [as argv] (/home/ubuntu/caliper-benchmarks/node_modules/yargs/yargs.js:1088:21)
Try running the following commands,
npx caliper bind --caliper-bind-sut fabric:2.1
npx caliper launch manager --caliper-workspace . --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-networkconfig networks/fabric/v2/v2.1.0/2org1peergoleveldb_raft/fabric-go-tls-solo.yaml --caliper-flow-only-test --caliper-fabric-gateway-enabled
npx caliper launch manager --caliper-workspace . --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-networkconfig networks/fabric/v2/v2.1.0/2org1peergoleveldb_raft/fabric-go-tls-solo.yaml --caliper-flow-only-test --caliper-fabric-gateway-usegateway --caliper-fabric-gateway-discovery
See Setting up and Running a Performance Benchmark on an existing network

Unable to apply changes on device: emulator-5554. Error is: Command gradlew.bat failed with exit code 1

I begin new project with NativeScript, but after more and more try i couldn't fix my error.
After build my application with:
tns run android --device Pixel_4_API_30
i have this error :
Unable to apply changes on device: emulator-5554. Error is: Command gradlew.bat failed with exit code 1.**
...............................................................................................
My trace loge :
#############################################################################
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Debug level logging will leak security sensitive information!
https://docs.gradle.org/6.4/userguide/logging.html#sec:debug_security
#############################################################################
Command gradlew.bat failed with exit code 1
Will send the following information to Google Analytics: {
type: 'googleAnalyticsData',
category: 'CLI',
googleAnalyticsDataType: 'event',
action: 'Performance',
label: 'AndroidProjectService__buildProject',
customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' },
value: 3529
}
Error: Command gradlew.bat failed with exit code 1
at Errors.failWithOptions (C:\Users\BRYAN\AppData\Roaming\nvm\v12.13.0\node_modules\nativescript\lib\common\errors.js:157:27)
at Errors.fail (C:\Users\BRYAN\AppData\Roaming\nvm\v12.13.0\node_modules\nativescript\lib\common\errors.js:130:21)
at GradleCommandService.<anonymous> (C:\Users\BRYAN\AppData\Roaming\nvm\v12.13.0\node_modules\nativescript\lib\services\android\gradle-command-service.js:40:30)
at Generator.throw (<anonymous>)
at rejected (C:\Users\BRYAN\AppData\Roaming\nvm\v12.13.0\node_modules\nativescript\lib\services\android\gradle-command-service.js:6:65)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
tns info :
√ Getting NativeScript components versions information...
√ Component nativescript has 7.2.0 version and is up to date.
‼ Update available for component #nativescript/core. Your current version is 7.1.4 and the latest available version is 7.3.0.
√ Component #nativescript/ios has 7.2.0 version and is up to date.
√ Component #nativescript/android has 7.0.1 version and is up to date.
Gradle is connected to Java so check your installed version is 8. If not then get the correct version and try again. ns doctor is your friend!
If that doesn't work, stop any java and emulator (android/qemu) related tasks/processes and try again.
If that fails try rebooting your computer and test again.

Hello Folks: I am having problem in starting sails app in nodejs. can anyone put forth their insights on that?

I tried running the latest version of node and postgresql, but was having problem i deprecated node to 13.12.0 and sails-postgresql to 1.0.2 as mentioned in one of the blog. still the error is coming. Stack trace is as below:
sails lift
info: Starting app...
(node:10460) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
info: Initializing apianalytics hook... (requests to monitored routes will be logged!)
info: ·• Auto-migrating... (alter)
info: Hold tight, this could take a moment.
error:
error: Error: Sails is taking too long to load.
Troubleshooting tips:
-• Were you still reading/responding to an interactive prompt?
(Whoops, sorry! Please lift again and try to respond a bit more quickly.)
-• Do you have a lot of stuff in assets/? Grunt might still be running.
(Try increasing the hook timeout. Currently it is 40000.
e.g. sails lift --hookTimeout=80000)
-• Is blueprints a custom or 3rd party hook?
(If initialize() is using a callback, make sure it's being called.)
at Timeout.tooLong [as _onTimeout] (C:\Users\dearm\OneDrive\Desktop\my work\sails-logrocket\myapp\node_modules\sails\lib\app\private\loadHooks.js:191:21)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
error: Could not load Sails app.
error:
error: Tips:
error: • First, take a look at the error message above.
error: • Make sure you've installed dependencies with npm install.
error: • Check that this app was built for a compatible version of Sails.
error: • Have a question or need help? (http://sailsjs.com/support)
complete code is here https://github.com/mannawar/sails_app
Try using Node version 10 and sails-postgresql version 2.0.0

Resources