VNOUN - Vue3 NodeJS Multi-Purpose Responsive Online Store MEVN

why you need python2 this is obsolete please update it to use pyton3 as I am getting this error on ubuntu 20.04

npm ERR! gyp ERR! node -v v16.16.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1

sudo apt install python2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python2' has no installation candidate


 sudo apt update

sudo apt upgrade
sudo apt install python2.7
sudo apt install python-pip


 hello bro, I got it working on the second server, but getting below
> error server setup  on npm install cmd
>
>
>
> npm ERR! code 1

solution

Please downgrade your node version to



npm install nodemon --save-dev

to check all node version

nvm ls-remote 

nvm install v14.17.3

root@server:/home/cloudo.us/public_html/vnoun/server# ls
app.js      controllers  node_modules  package-lock.json  routes     utils
config.env  models       package.json  README.md          server.js
root@server:/home/cloudo.us/public_html/vnoun/server# cat config.env
#PASSWORD=bum
DATABASE=mongodb://admin-user:bum@localhost:27017/admin

getting only 1300*24 

You are running on development

Please check the NODE_ENV in config.env and .env files on server folder and client folder.

Make sure that NODE_ENV=production on both files then rebuild the dist folder then place it on server folder and finally restart your server.

Error: No default engine was specified and no extension was provided.
    at new View (/home/cloudo.us/public_html/vnoun/server/node_modules/express/lib/view.js:61:11)
    at Function.render (/home/cloudo.us/public_html/vnoun/server/node_modules/express/lib/application.js:587:12)
    at ServerResponse.render (/home/cloudo.us/public_html/vnoun/server/node_modules/express/lib/response.js:1039:7)
    at sendErrorProd (/home/cloudo.us/public_html/vnoun/server/controllers/errorController.js:79:37)
    at module.exports (/home/cloudo.us/public_html/vnoun/server/controllers/errorController.js:103:5)
    at Layer.handle_error (/home/cloudo.us/public_html/vnoun/server/node_modules/express/lib/router/layer.js:71:5)
    at trim_prefix (/home/cloudo.us/public_html/vnoun/server/node_modules/express/lib/router/index.js:326:13)
    at /home/cloudo.us/public_html/vnoun/server/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/home/cloudo.us/public_html/vnoun/server/node_modules/express/lib/router/index.js:346:12)
    at next (/home/cloudo.us/public_html/vnoun/server/node_modules/express/lib/router/index.js:280:10)
ERROR  {
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: '/home/cloudo.us/public_html/vnoun/server/dist/index.html',
  expose: false,
  statusCode: 404,
  status: 404,
  message: "ENOENT: no such file or directory, stat '/h
ome/cloudo.us/public_html/vnoun/server/dist/index.html'"

navigate to client
npm run build 

then place dist folder inside server

this is searching nodejs12

 error  in ./src/scss/main.scss

Error: Missing binding /home/cloudo.us/public_html/vnoun/client/node_modules/node-sass/vendor/linux-x64-72/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 12.x

remove nvm 

nvm uninstall 18.10.0

Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation