m4heshd / vuelectro

Bare minimum, simplistic, production ready scaffolding/build tool for developing with :electron: Electron and Vue.Js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zsh: command not found: vuelectro

arrownorth opened this issue · comments

Hi! I followed the instructions exactly, and even updated node via nvm and npm via "npm update". Still no dice.

Thanks in advance! Vuelectro looks like the best option with the least mucking about. Hoping to get this working.

I have a bare package.json here:

{
  "name": "myapp",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0",
    "vuelectro": "^1.2.3"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/vue3-essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "babel-eslint"
    },
    "rules": {}
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
  ]
}

Hi @arrownorth,
I'm guessing this is on Mac. Do you get this error when you try to run vuelectro init? or did you forget initialize Vuelectro?
A bit more info about the platform and your node version would be great.

Can you try npx vuelectro init?

Thanks! Yes this is on a Mac, running 11.2.1. Node: v16.2.0.

Running NPX seems to work, but then I can't run "npm run electron:serve" as instructed.

`npx vuelectro init
INFO Initializing Vuelectro project..

INFO Template files copied

? What version of Electron do you want to use? 12.0.9 (latest).

yarn add v1.22.4
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍 Resolving packages...
error Received malformed response from registry for "". The registry may be down.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
ERROR There was an error trying to install dependencies. Try running "npm install" manually.

DONE Vuelectro initialization completed successfully. Try "npm run electron:serve"`

I get:

`npm run electron:serve

myapp@0.1.0 electron:serve
cross-env VUELECTRO_ENV=serve vuelectro serve

sh: cross-env: command not found`

! Solved. npm install cross-env and using npm vuelectro init fixed it. Wowsers. Thanks!

Great to hear. I'm gonna go ahead and close the issue. Feel free to continue the conversation or open a new issue if you run into any other problems.