Can not run bubble wrap - node.js

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

Related

npm will not respond at all

no matter what npm package I have, or try and install I keep getting this weird syntax error.
Users/BenNolan/.node/lib/node_modules/npm/lib/cli.js:66
module.exports = async process => {
^^^^^^^
SyntaxError: Unexpected identifier
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/BenNolan/.node/lib/node_modules/npm/bin/npm-cli.js:2:1)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
I have tried updating nvm, npm and node no matter what I try I am still getting the syntax error halfway through the install.

Not able to create and Run react app. reinstalling didn't worked

I have tried to reinstall VS code and Node but it did not work out.Please help!
Error While Creating -
C:\Users\ADMIN\Desktop\Projects>npx create-react-app my-app
C:\Users\ADMIN\Desktop\node_modules\fs-extra\lib\ensure\file.js:1
$→��m��mo�L�D��;�%g�?w��ŷ↓�▬��ovH0��a�5��*�ؒ��l͛�S�iy☺�r�O7����%L]��%��∟�hk
^
SyntaxError: Invalid or unexpected token
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1032:15)
at Module._compile (node:internal/modules/cjs/loader:1067:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157: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.<anonymous> (C:\Users\ADMIN\Desktop\node_modules\fs-extra\lib\ensure\index.js:3:40)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
While Running -
C:\Users\ADMIN\Desktop\Projects\portfolio-website>npm start
> portfolio#0.1.0 start
> react-scripts start
Failed to compile.
Invalid or unexpected token

node-mysql2: Object.entries is not a function

I am trying to set up nodejs project on Hostgator. But while setting up I am getting the below error. Any help would be really appreciated.
My node version is 16.8.0 and the npm version is 7.21.0
/home/dir/project_folder/node_modules/mysql2/lib/packets/index.js:49
Object.entries(ctorMap).forEach(([name, ctor]) => {
^
TypeError: Object.entries is not a function
at Object.<anonymous> (/home/dir/project_folder/node_modules/mysql2/lib/packets/index.js:49:8)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/dir/project_folder/node_modules/mysql2/lib/connection.js:23:17)
at Module._compile (module.js:577:32)
It is working by replacing node mysql2 with mysql package.

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 ?

uncaughtException SyntaxError: Use of const in strict mode in sparkpost modules

{"level":"error","message":"uncaughtException SyntaxError: Use of
const in strict mode.\n at Module._compile (module.js:439:25)\n
at Object.Module._extensions..js (module.js:474:10)\n at
Module.load (module.js:356:32)\n at Function.Module._load
(module.js:312:12)\n at Module.require (module.js:364:17)\n at
require (module.js:380:17)\n at Object.
(/var/www/myproject/dist/node_modules/sparkpost/node_modules/request/node_modules/hawk/lib/index.js:5:33)\n
at Module._compile (module.js:456:26)\n at
Object.Module._extensions..js (module.js:474:10)\n at Module.load
(module.js:356:32)\n at Function.Module._load (module.js:312:12)\n
at Module.require (module.js:364:17)\n at require
(module.js:380:17)\n at Object.
(/var/www/myproject/dist/node_modules/sparkpost/node_modules/request/request.js:9:12)\n
at Module._compile (module.js:456:26)\n at
Object.Module._extensions..js
(module.js:474:10)","timestamp":"2017-09-25T02:45:43.418Z"}
I've found that problem when I run my node backend project. I didn't upgrade anything in these days and encounter that error accidentally.
My node version is node -v v0.10.37 npm -v 1.4.28 Please help me how to solve that issue. Thanks.

Resources