nest js unable to create new application mac os - nestjs

I'm trying to create new nestjs project using command nest new myApp
it's gives me
/usr/local/lib/node_modules/#nestjs/cli/node_modules/chalk/source/index.js:103
...styles,
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/#nestjs/cli/commands/command.loader.js:3:15)
I'm using mac os

I needed to update my nodejs as prerequisite from the documentation
Prerequisites# Please make sure that Node.js (>= 10.13.0) is installed on your operating system.

Related

Unexpected token issue in truffle on Windows

I am trying to install truffle on node version 8.9.0 and npm version 5.5.1. It got installed but am not able to do anything in that. every time I try any command, even try to unbox it shows an error.
C:\Users\com\AppData\Roaming\nvm\v8.9.0\node_modules\truffle\build\86.bundled.js:55160
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.__webpack_require__.f.require (C:\Users\com\AppData\Roaming\nvm\v8.9.0\node_modules\truffle\build\cli.bundled.js:603:28)
the required node version is Node v12 or later. https://trufflesuite.com/docs/truffle/getting-started/installation/#requirements

Can not run bubble wrap

I'm trying to run BubbleWrap, this is the error that I run into
bubblewrap build
/usr/local/lib/node_modules/#bubblewrap/cli/node_modules/uuid/dist/esm-browser/index.js:1
export { default as v1 } from './v1.js';
^^^^^^
SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (/usr/local/lib/node_modules/#bubblewrap/cli/node_modules/googleapis-common/build/src/apirequest.js:20:14)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
I'm using nodejs version 14.18.0 and npm version 6.14.15
I didn't make any changes to the code and I didn't know much about nodejs to know what's going on
Can someone help, please?
thanks
It seems that I download bubblewrap with nodejs v 8
I reinstall with nodejs 14 and it works now
thanks

SyntaxError: Unexpected token when trying to run ssh on Google Cloud

I am trying to run an SSH on Google Cloud, and I am using node.js.
When I am trying to write node app.js in the ssh console (Ubuntu), I am getting this error:
SyntaxError: Unexpected token =
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/bdognames/serverSystem/msg-system-server/logic/usersLogic.js:3:20)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
The strange part is, when I am running this code on my PC, it works just fine. Can someone please help ?

CircleCI fails at the fs-extra node_modules

I have been working on a project and recently, in Circle CI pipelines, I started to get this error.
/root/project/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
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)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/root/project/node_modules/fs-extra/lib/mkdirs/index.js:3:44)
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)
at Module.require (module.js:597:17)
I see some discussions about it online.
https://github.com/google/docsy/issues/265
https://www.gitmemory.com/issue/jprichardson/node-fs-extra/790/614647362
The nodejs version is 12.16.1
The fs-extra version is 9.0.1, in the cases, it was mentioned as ^9.0.0.
Does anyone know where this error comes from, and how to fix it? It seems like I am aligned with my node version (over v10) and the fs-extra. I prefer not to downgrade unless it is the only solution atm.

ERROR Plugin load failed: hexo-deployer-git when I deploy the blog

Git, node, hexo are all installed correctly.But when I installed hexo-deployer-git, all the hexo commands will have the following problems. Is this a problem with the plugin? How should I solve it?
The following is an error message, can you help me?
'''
$ hexo d
ERROR Plugin load failed: hexo-deployer-git
D:\blog\node_modules\picomatch\lib\picomatch.js:54
let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:\blog\node_modules\picomatch\index.js:3:18)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:\blog\node_modules\hexo-deployer-git\node_modules\readdirp\index.js:6:19)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
ERROR Deployer not found: git
'''
You may be running an older version of Node that doesn't support that syntax. The SyntaxError is being caused by the spread operator ..., which is supported in Node versions 8.3 or later.
To check your Node version run node -v in a terminal window.

Resources