Node-js: sendgrid - cannot create production build - node.js

When i try to generate a production build to deploy my react App i get this error:
Creating an optimized production build...
Failed to compile.
static/js/main.709a793f.js from UglifyJs
SyntaxError: Unexpected token: name (EmailAddress) [./~/#sendgrid/helpers/classes/email-address.js:11,0]
I think this error is caused by the Sendgrid NPM package.
I tried to reinstall Sendgrid via npm and verified that there is no missing dependencies.
-> % npm -v
6.2.0
-> % node -v
v10.8.0
Thank you in advance

Related

Error on firebase deploy: package.json indicates an outdated version of firebase-functions

On firebase deploy I receive the error:
⚠ functions: package.json indicates an outdated version of firebase-functions. Please upgrade using npm install --save firebase-functions#latest in your functions directory.
followed by a long list of
⚠ functions: Please note that there will be breaking changes when you upgrade.
[2022-11-28T21:50:38.780Z] #firebase/database: FIREBASE WARNING: {"code":"app/invalid-credential","message":"Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "Error fetching access token: Error while making request: getaddrinfo ENOTFOUND metadata.google.internal. Error code: ENOTFOUND"."}
A similar question is asked but their issue was that they weren't able to figure out how to cd to the functions folder... I was able to cd to the functions folder and have tried all suggested solutions.
I have tried cd functions to navigate to my functions directory and run npm install --save firebase-functions#latest but on deploy I receive the same error.
I have run the installs with sudo.
I have run npm i -g firebase-tools in the top-level folder.
Someone on another thread suggested running sudo npm i -g firebase-admin and I tried this as well.
Nothing works. Any ideas? Also, is the second error a second error, or a result of the first?

npm run Build:dev error when doing Advance UI Customization

I wanted to customize the UI elements in the publisher portal and followed this guide
But I get the following error when running this in cmd;
npm run build:dev
ERROR in ./node_modules/#material-ui/core/esm/styles/createPalette.js Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: .\Downloads\wso2am-4.1.0\repository\deployment\server\jaggeryapps\publisher\node_modules#material-ui\core\esm\styles\createPalette.js: Unexpected token, expected "," (174:319)
I’m using node version 16.14.0 and npm version 8.9.0.
Can you try with the node version 12.x or 14.x? It works with those versions.

Trying to install Azure Bot framework tools and getting error

I am on mac, npm 6.14.4 and dotnet 3.1.300
I am getting the following install error and not able to install dispatch cli.
Failed at the dotnet-2.1#2.1.1005 postinstall script.
I am following the instruction from here.

Node.js Failing to Create App After updating

I'm using Window's bash to create a react app ad I get this error. I tried updating eslint and using npx create-react-app xyz, however, I get the below error message.
$ npx create-react-app demo-counter
npx: installed 1 in 14.364s
Path must be a string. Received undefined
C:\Users\Rob\AppData\Roaming\npm\node_modules\create-react-app\index.js
Creating a new React app in C:\Users\Rob\webprojects\september\demo-counter.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.9.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
error eslint#5.6.0: The engine "node" is incompatible with this module. Expected version "^6.14.0 || ^8.10.0 || >=9.10.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts --cwd C:\Users\Rob\webprojects\september\demo-counter has failed.
Looks like you might be on an unsupported version of node. What's the output when you type node -v in your terminal?

The ionic start command fails for me with the following error on Ubuntu 14.04

The ionic start command fails for me with the following error on Ubuntu 14.04 and need assistance in resolving the issue:
andrew#FinancialIndepence:~/WebstormProjects/stadiumStore/mobile$ ionic start myApp tabs
Creating Ionic app in folder /home/andrew/WebstormProjects/stadiumStore/mobile/myApp based on tabs project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
[=============================] 100% 0.0s
Downloading: https://github.com/driftyco/ionic-starter-tabs/archive/master.zip
[=============================] 100% 0.0s
Update config.xml
Initializing cordova project
Fetching plugin "org.apache.cordova.device" via plugin registry
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
SyntaxError: Unexpected token I
Internal routing error
Sorry, we cannot connect to the intended server.
We have just been notified of this problem. We will correct it as soon as possible.
Feel free to contact us if you have any questions: support#iriscouch.com
at Object.parse (native)
at RegClient.<anonymous> (/home/andrew/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:274:23)
at /home/andrew/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:251:7
at Gunzip.onEnd (zlib.js:167:5)
at Gunzip.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:442:13)
Unable to add plugins. Perhaps your version of Cordova is too old. Try updating (npm install -g cordova), removing this project folder, and trying again. (CLI v1.3.0)
Thanks in advance!
In the forums several people were saying that the plugins.cordova.io server was down. Others say that trying a different version worked for them.
http://forum.ionicframework.com/t/ionic-start-cli-errors/15468/4
I just ran the same command and had no trouble with it

Resources