Atom editor is not executing programs - atom-editor

Hello my atom software is not executing programs . i would love to know how i can solve this problem
::When i execute i am given the following error
[ ^^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:606:28)
at Object.Module._extensions..js (module.js:653:10)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:504:12)
at Function.Module._load (module.js:496:3)
at Function.Module.runMain (module.js:683:10)
at startup (bootstrap_node.js:196:16)
at bootstrap_node.js:622:3][1]

To execute a program in Atom I would first try downloading and installing the Script package. After installing this package, open your file and go to the packages menu. You'll see the newly installed script. Select this to run your script. See image below.

Do all your lib/*.js files have at the top this line?
'use babel';

Related

Running pnpm lint-fix on a nextjs repository

I have a pull request in with the nextjs project here:
https://github.com/vercel/next.js/pull/45238
To get it accepted, I need to run pnpm lint-fix on the code.
I am utterly unfamiliar with pnpm and Python, but I got the latter installed correctly and then the former. I ran pnpm install and I then ran pnpm install lint-fix
It all installed. Or at least it appeared to do so.
Then, I try to run pnpm lint-fix and the result is:
PS C:\code\next.js\examples\auth-passage-passwordless> pnpm lint-fix
Error: Module build failed: TypeError: /home/gitlab-runner/builds/8a39c300/0/pr/lint-fix/lib/bin.js: Duplicate declaration "b" (This is an error on an internal node. Probably an internal error.)
at File.buildCodeFrameError (/home/gitlab-runner/builds/8a39c300/0/pr/lint-fix/node_modules/#babel/core/lib/transformation/file/file.js:209:12)
at Scope.checkBlockScopedCollisions (/home/gitlab-runner/builds/8a39c300/0/pr/lint-fix/node_modules/#babel/core/node_modules/#babel/traverse/lib/scope/index.js:303:27)
at Scope.registerBinding (/home/gitlab-runner/builds/8a39c300/0/pr/lint-fix/node_modules/#babel/core/node_modules/#babel/traverse/lib/scope/index.js:485:16)
at Scope.registerDeclaration (/home/gitlab-runner/builds/8a39c300/0/pr/lint-fix/node_modules/#babel/core/node_modules/#babel/traverse/lib/scope/index.js:404:14)
at Object.BlockScoped (/home/gitlab-runner/builds/8a39c300/0/pr/lint-fix/node_modules/#babel/core/node_modules/#babel/traverse/lib/scope/index.js:146:28)
at Object.newFn (/home/gitlab-runner/builds/8a39c300/0/pr/lint-fix/node_modules/#babel/core/node_modules/#babel/traverse/lib/visitors.js:266:17)
at NodePath._call (/home/gitlab-runner/builds/8a39c300/0/pr/lint-fix/node_modules/#babel/core/node_modules/#babel/traverse/lib/path/context.js:64:19)
at NodePath.call (/home/gitlab-runner/builds/8a39c300/0/pr/lint-fix/node_modules/#babel/core/node_modules/#babel/traverse/lib/path/context.js:34:14)
at NodePath.visit (/home/gitlab-runner/builds/8a39c300/0/pr/lint-fix/node_modules/#babel/core/node_modules/#babel/traverse/lib/path/context.js:99:12)
at TraversalContext.visitQueue (/home/gitlab-runner/builds/8a39c300/0/pr/lint-fix/node_modules/#babel/core/node_modules/#babel/traverse/lib/context.js:139:18)
at Object. (C:\code\next.js\examples\auth-passage-passwordless\node_modules\lint-fix\dist\bin.js:71:7)
at webpack_require (C:\code\next.js\examples\auth-passage-passwordless\node_modules\lint-fix\dist\bin.js:21:30)
at C:\code\next.js\examples\auth-passage-passwordless\node_modules\lint-fix\dist\bin.js:64:18
at Object. (C:\code\next.js\examples\auth-passage-passwordless\node_modules\lint-fix\dist\bin.js:67:10)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159: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)
at require (node:internal/modules/cjs/helpers:102:18)
I have Googled until my fingers bled, but came across nothing of help.
How do I get lint-fix up and running?

Cloudflare and next.js static exports not working?

It normally works but suddenly it stoped working and im not sure
why. If you can help thanks!
logs
2022-11-24T13:14:56.98176Z Executing user command: next build && next export
2022-11-24T13:14:57.075259Z /opt/buildhome/repo/node_modules/next/dist/build/index.js:344
2022-11-24T13:14:57.075558Z ...pageKeys.app ?? [],
2022-11-24T13:14:57.075709Z ^
2022-11-24T13:14:57.075852Z
2022-11-24T13:14:57.075978Z SyntaxError: Unexpected token '?'
2022-11-24T13:14:57.076087Z at wrapSafe (internal/modules/cjs/loader.js:1054:16)
2022-11-24T13:14:57.076193Z at Module._compile (internal/modules/cjs/loader.js:1102:27)
2022-11-24T13:14:57.0763Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2022-11-24T13:14:57.076409Z at Module.load (internal/modules/cjs/loader.js:986:32)
2022-11-24T13:14:57.076516Z at Function.Module._load (internal/modules/cjs/loader.js:879:14)
2022-11-24T13:14:57.076621Z at Module.require (internal/modules/cjs/loader.js:1026:19)
2022-11-24T13:14:57.076736Z at require (internal/modules/cjs/helpers.js:72:18)
2022-11-24T13:14:57.076877Z at Object.<anonymous> (/opt/buildhome/repo/node_modules/next/dist/cli/next-build.js:10:37)
2022-11-24T13:14:57.077002Z at Module._compile (internal/modules/cjs/loader.js:1138:30)
2022-11-24T13:14:57.077111Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2022-11-24T13:14:57.082209Z Failed: build command exited with code: 1
2022-11-24T13:14:57.927713Z Failed: an internal error occurred
It exports the files and deploys to cloud flare
The error you are getting indicates that your Node version does not support the nullish coalescing operator, which is part of Node as of version 14.
From reading the Cloudflare docs I understand that the default Node version is 12, which would match this suspicion.
The solution then would be to update your Cloudflare configuration to use a newer version (14+) of Node (see docs).

NextJS 12 Runtime Crash - SyntaxError: Unexpected token ')'

Im having an issue that I first saw after the release of NextJS 12 and im still seeing now with NextJS 12.0.8. It's completely stopping me from upgrading from version 11.
Essentially my application will build fine, no errors, and the server will start, but the second I make the first request to it, it trips over and I get the following highly unhelpful error
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153: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)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.__webpack_require__.f.require (/app/.next/server/webpack-runtime.js:143:28)
at /app/.next/server/webpack-runtime.js:70:40
/app/.next/server/chunks/6859.js:135
/***/ }),
^
SyntaxError: Unexpected token ')'
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153: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)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.__webpack_require__.f.require (/app/.next/server/webpack-runtime.js:143:28)
at /app/.next/server/webpack-runtime.js:70:40
The problem seems to be running on Alpine linux as I can perform a production build locally, then run it with no issues However after building my production docker container and deploying it, I see a white screen, with this error in the console.
Googling this has come up with nothing, checking the source at that point reveals nothing interesting to me.
My app has been working fine on Next JS 11, but upgrading to 12 blows up. I see nothing in the docs about needing to do anything different with regards to docker or alpine linux.
Can any one help?
So the problem was due to an internal cleaning process we run and a change in the way Next 12 prints the source map declarations.
Basically, the sourcemap definition was on the same line as the closing bracket, whereas it was on a new line previously.
More info here: https://github.com/vercel/next.js/issues/33241#issuecomment-1013580180

Reinstalling node-fibers for a Meteor app on Modulus.io?

I'm trying to port a Meteor application from Heroku to Modulus.io (hopefully will be able to test out sticky sessions and horizontal scaling). I've demeteorized my app using the Modulus.io script, as spelled out in the following articles and repositories.
https://github.com/onmodulus/demeteorizer
http://blog.modulus.io/demeteorizer
After demeteorizing, I zipped and uploaded, and got an empty deploy log and a white screen in the browser. After a bit more research, I deleted the node_modules directory in the resulting demeteorized application, and then zipped and uploaded. That definitely seemed to be the right move, because everything started deploying, and the logs got busy.
Here's the error I'm coming up with though:
Error: `/mnt/data/1/clinical-workqueues/server/node_modules/fibers/bin/linux-x64-v8-3.11/fibers.node` is missing. Try reinstalling `node-fibers`?
at Object.<anonymous> (/mnt/data/1/clinical-workqueues/server/node_modules/fibers/fibers.js:13:8)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/mnt/data/1/clinical-workqueues/server/server.js:3:13)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
Forever detected script exited with code: 1
Forever restarting script for 6 time
Does anybody know how I ought to go about 'reinstalling node-fibers' in the Modulus.io environment, using a demeteorized Meteor app? I'm getting out of my league here, and am not sure how to proceed.
Thanks in advance for any thoughts or suggestions!
I created a blog article that should help out others trying to deploy Meteor apps to Modulus.
http://blog.modulus.io/deploying-meteor-apps-on-modulus
Disclosure: I'm the author of Demeteorizer and co-founder of Modulus.
Solution was to upgrade to Demeteorizer 0.2.1, run a 'meteor add email' to my application, and then add the following dependencies to my package.json file:
"sockjs": "0.3.4",
"websocket": "1.0.7",
"mongodb": "1.2.13",
"mailcomposer": "0.1.15"

Error when start the r-node

I got this error when I started the r-node server:
./run-server.sh
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: libR.so: cannot open shared object file: No such file or directory
at Object..node (module.js:416:11)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at require (module.js:348:19)
at Object.<anonymous> (/home/ubuntu/software/r-node-v0.1.1/server/rserve.js:21:15)
at Module._compile (module.js:404:26)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at require (module.js:348:19)
I installed the nodejs and just followed the steps. I also searched for libR.so, which located in /usr/lib/R/lib and I add this to the system path, but r-node server still could not find it.
Any idea?
Make sure /usr/lib/R/lib/ is known to the program running this.
When you run R itself, it adds this to LD_LIBRARY_PATH in the script /usr/bin/R. You need to do this too, and possible ways to set it are
via a one-line file in /etc/ld.so.conf.d/
via /etc/ld.so.conf
via LD_LIBRARY_PATH

Resources