Re-building the frontend or installing any new node packages may require upgrading the node.js installation. I was getting errors such as the following:
> npm run start-local
Failed to compile.
./src/index.js
Error: [BABEL] /home/noronhaa/debug_npm/sample-tracking-frontend/src/index.js: Package exports for '/home/noronhaa/debug_npm/sample-tracking-frontend/node_modules/@jridgewell/gen-mapping' do not define a valid '.' target (While processing: "/home/noronhaa/debug_npm/sample-tracking-frontend/node_modules/babel-preset-react-app/index.js")
in Babel and other packages, and google searches revealed that Node 13.1 is not compatible with certain packages. In the absence of root privileges, node may be installed in and used from your home directory:
mkdir $HOME/node_install ; cd $HOME/node_install
wget https://nodejs.org/download/release/latest-v14.x/node-v14.19.1-linux-x64.tar.gz
tar -xzvf node-v14.19.1-linux-x64.tar.gz
export NODEJS_HOME=$HOME/node_install/node-v14.19.1-linux-x64
export PATH=$NODEJS_HOME/bin:$PATH
node -v
Re-building the frontend or installing any new node packages may require upgrading the node.js installation. I was getting errors such as the following:
in Babel and other packages, and google searches revealed that Node 13.1 is not compatible with certain packages. In the absence of root privileges, node may be installed in and used from your home directory: