I'm trying to setup a parse on google cloud but can't setup the cloud/main.js file
add cloud link on server.js
cloud: "/opt/bitnami/apps/parse/htdocs/cloud/main.js",
I got the following error:
SyntaxError: Unexpected token )
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at new ParseServer (/opt/bitnami/apps/parse/htdocs/node_modules/parse-server/lib/ParseServer.js:159:9)
error: Forever detected script exited with code: 1
When editing the ‘server.js’ file in ‘/opt/bitnami/apps/parse/htdocs/’ folder, make sure the ‘cloud’ folder exists and try setting the ‘cloud’ field string to “./cloud/main.js” to point to main.js file in cloud folder, the error could be related to incorrect path. If you are looking to add custom code to the Parse server, please follow the steps provided here [1].
[1] https://docs.bitnami.com/google/apps/parse/#how-to-add-your-custom-cloud-code-to-your-parse-server-stack
Related
I had node installed on "C:", then I moved the folders onto another drive.
When I try to execute a .js file, I get the following error, I don t know where can I modify to be able to run the code on that drive.
It worked fine on "C:" drive. Sorry, I`m new to this.
Thank you.
SyntaxError: Error parsing Z:\Resource Database\Dashboards data\node_modules\newman\package.json: Unexpected token in JSON at position 2687
at parse (<anonymous>)
at readPackage (node:internal/modules/cjs/loader:304:20)
at resolveExports (node:internal/modules/cjs/loader:479:15)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (Z:\Resource Database\Dashboards data\Automation-meter_readings\writeToFile.js:1:16)
at Module._compile (node:internal/modules/cjs/loader:1105:14) {
path: 'Z:\\Resource Database\\Dashboards data\\node_modules\\newman\\package.json'
}```
I'm trying to upgrade to Vaadin 23 from Vaadin 18. After performing the steps listed on the upgrade instructions I'm having a ton of issues getting the front-end build. The latest blocker is that after starting the app, npm runs, but I see the below error. I checked the node_modules folder and the build-status-plugin folder is a symlink to target\plugins\build-status-plugin, which is empty.
The rest of the node_modules folder looks fine as far as I can tell.
java.lang.IllegalStateException: Startup of Webpack failed. Output was:
[webpack-cli] Failed to load 'C:\Users\daniel.watson\git\data-loader-web\webpack.config.js' config
[webpack-cli] Error: Cannot find module '#vaadin/build-status-plugin'
Require stack:
- C:\Users\daniel.watson\git\data-loader-web\webpack.generated.js
- C:\Users\daniel.watson\git\data-loader-web\webpack.config.js
- C:\Users\daniel.watson\git\data-loader-web\node_modules\webpack-cli\lib\webpack-cli.js
- C:\Users\daniel.watson\git\data-loader-web\node_modules\webpack-cli\lib\bootstrap.js
- C:\Users\daniel.watson\git\data-loader-web\node_modules\webpack-cli\bin\cli.js
- C:\Users\daniel.watson\git\data-loader-web\node_modules\webpack-dev-server\bin\webpack-dev-server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\daniel.watson\git\data-loader-web\webpack.generated.js:16:27)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\daniel.watson\\git\\data-loader-web\\webpack.generated.js',
'C:\\Users\\daniel.watson\\git\\data-loader-web\\webpack.config.js',
'C:\\Users\\daniel.watson\\git\\data-loader-web\\node_modules\\webpack-cli\\lib\\webpack-cli.js',
'C:\\Users\\daniel.watson\\git\\data-loader-web\\node_modules\\webpack-cli\\lib\\bootstrap.js',
'C:\\Users\\daniel.watson\\git\\data-loader-web\\node_modules\\webpack-cli\\bin\\cli.js',
'C:\\Users\\daniel.watson\\git\\data-loader-web\\node_modules\\webpack-dev-server\\bin\\webpack-dev-server.js'
]
}
com.vaadin.base.devserver.AbstractDevServerRunner.doStartDevModeServer(AbstractDevServerRunner.java:217)
com.vaadin.base.devserver.AbstractDevServerRunner.runOnFutureComplete(AbstractDevServerRunner.java:169)
com.vaadin.base.devserver.AbstractDevServerRunner.lambda$new$0(AbstractDevServerRunner.java:160)
java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:479)
java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
I am trying to do a https post in firebase function, and I tried to deploy the code below but it had problems with "request". I would like to know how to solve the issue below and do a https post.
Deployment error.
Function failed on loading user code. Error message: Code in file index.js can't be loaded.
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module 'request'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/srv/index.js:36:15)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
I have executed this on command line, but I dont see any request module in package.json
npm install --save request
The following is my firebase function code
https://gist.github.com/axilaris/378a4a3b344b22ed09d6ed6b1ec4b14f
If you don't see the request module in your package.json, that means you probably ran the npm command in the wrong folder. You should run it from your "functions" folder, where package.json lives.
I'm trying to perform audit using Lighthouse CLI. My site requires authentication. How can I get Lighthouse CLI to analyse my site? Can I supply login credentials?
Also the CLI seems to be broken and/or not comply to documentation.
$ npm install -g lighthouse
$ lighthouse --help
C:\Users\kermit\AppData\Roaming\nvm\v8.11.1\node_modules\lighthouse\lighthouse-core\lib\url-shim.js:36
class URLShim extends URL {
^
ReferenceError: URL is not defined
at Object.<anonymous> (C:\Users\kermit\AppData\Roaming\nvm\v8.11.1\node_modules\lighthouse\lighthouse-core\lib\url-shim.js:36:23)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\kazuy\AppData\Roaming\nvm\v8.11.1\node_modules\lighthouse\lighthouse-core\lib\network-request.js:14:13)
at Module._compile (module.js:652:30)
Make sure you're using Node >= 10. URL got added at Node v10 (https://nodejs.org/api/globals.html#globals_url)
Please Upgrade Node and apply single or double quote on URL like below with L-CLI
lighthouse 'https://google.com' --port=9222
For the authenticated page, you have two below options
1. use --extra-headers={cookies}
2. use --port=9222 //port is debug port
I'm trying to run the Zza sample. I've followed the instruction exactly. When I try and run: "node server" or "node server.js" I get:
C:\Users\RobbyV\Documents\Code\Breeze\Samples\Zza-Node-Mongo\Zza-Node-Mongo\server.js:9
app.configure(function(){
^
TypeError: Object function (req, res, next) {
app.handle(req, res, next);
} has no method 'configure'
at Object.<anonymous> (C:\Users\RobbyV\Documents\Code\Breeze\Samples\Zza-Node-Mongo\Zza-Node-Mongo\server.js:9:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
Sorry, those instructions and the zip file that you downloaded were outdated. Discard them both.
I have since updated the web site page for the sample with new download instructions and have updated the readme.md within the sample with instructions that work (having just now confirmed them).
Please try again and let me that it works for you now.