Activities

Isan26

Isan26 posted a new question

electron-template •

add to existing proyect

Hi there,

i already have a proyect using Nuxt and i want to make it an APK, how can i install this template to an existing proyect without affecting the code already writen??

Thanks in advance

lefuturiste

lefuturiste posted a new question

electron-template •

404 error after nuxt build

When I want to build my app which work fine in development mode:

npm run build

After the successful nuxt build, I got this error:

Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
 • electron-builder version=20.39.0
 • loaded configuration file=package.json ("build" field)
 • writing effective config file=dist/builder-effective-config.yaml
 • rebuilding native production dependencies platform=linux arch=x64
Error: /usr/bin/node exited with code 1
Output:
> [email protected]3.0.8 install /mnt/data/workspace/retrobox/desktop/node_modules/lzma-native
> node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build
Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/mnt/data/workspace/retrobox/desktop/node_modules/lzma-native/binding-v3.0.8-electron-v2.0-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/mnt/data/workspace/retrobox/desktop/node_modules/lzma-native/binding-v3.0.8-electron-v2.0-linux-x64' (1)
Error output:
node-pre-gyp ERR! Tried to download(404): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-electron-v2.0-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected]3.0.8 and [email protected]2.0.0-beta.7 (electron-v2.0 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp ERR! Tried to download(undefined): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-electron-v2.0-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected]3.0.8 and [email protected]2.0.0-beta.7 (electron-v2.0 ABI, glibc) (falling back to source compile with node-gyp) 
gyp: Call to 'sh liblzma-config.sh "/mnt/data/workspace/retrobox/desktop/node_modules/lzma-native/build" "/mnt/data/workspace/retrobox/desktop/node_modules/lzma-native/deps/xz-5.2.3.tar.bz2"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.0.0-arch1-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/mnt/data/workspace/retrobox/desktop/node_modules/lzma-native/binding-v3.0.8-electron-v2.0-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/mnt/data/workspace/retrobox/desktop/node_modules/lzma-native/binding-v3.0.8-electron-v2.0-linux-x64"
gyp ERR! cwd /mnt/data/workspace/retrobox/desktop/node_modules/lzma-native
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/mnt/data/workspace/retrobox/desktop/node_modules/lzma-native/binding-v3.0.8-electron-v2.0-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/mnt/data/workspace/retrobox/desktop/node_modules/lzma-native/binding-v3.0.8-electron-v2.0-linux-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/mnt/data/workspace/retrobox/desktop/node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 5.0.0-arch1-1-ARCH
node-pre-gyp ERR! command "/usr/bin/node" "/mnt/data/workspace/retrobox/desktop/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /mnt/data/workspace/retrobox/desktop/node_modules/lzma-native
node-pre-gyp ERR! node -v v10.15.3
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok 
ll931217

ll931217 posted a new question

electron-template •

Using expressjs in this template

Hey guys, I am trying to figure out how to start a nuxtjs app with express and electron. What I have tried so far is using the express-template and installing electron, electron-devtools-installer then I copied the main.js code to start electron from electron-template and pasted it into the start method in the express-template, it runs without errors but electron isn't showing up.

Code is available here: https://codesandbox.io/s/927j4kzw6w

Run the project with: npm run dev:electron

jedaivokters

jedaivokters posted a new question

electron-template •

Silent fail on built app

electron . is working but when I built using electron-builder and run the app the express server is running but when launch on browser it just keeps loading with white screen

alegreiff

alegreiff posted a new question

electron-template •

static assets in electron

Cannot use static assets.

Modcat

Modcat posted a new question

electron-template •

SASS loader issue

I have done a fresh install followed all instructions and sass loader. I'm not so concerned about configs as I am making this a professional grade product. I should not be having this problem and if you want to replicate my problem simple…
git clone <repo>
cd my-project
yarn install
… and then modify a component to use SCSS and it will literally break in pieces in a sea of red. This should not be happening at all guys!

tetreault

tetreault posted a new question

electron-template •

Not Urgent: Cannot load the stats for nuxtjs on install

Create a new, empty project, cd into the project, and run npm i.

At the end you'll see:

[server error] Cannot load the stats for nuxtjs – please try again later
terion-name

terion-name posted a new bug report

electron-template •

bug Cannot GET /

Version

v1.1.1

Reproduction link

https://github.com/terion-name/metod-admin-temp

Steps to reproduce

yarn build

What is expected ?

app works

What is actually happening?

Cannot GET /

Additional comments?

I've used this template, generated app. In dev mode everything works ok. But If I build the app I get this:
Скриншот 2018-10-05 11.53.58.png

package.json:

{
  "name": "metod-admin",
  "version": "1.0.0",
  "description": "METOD admin client",
  "author": "Terion <[email protected]>",
  "private": true,
  "main": "main.js",
  "build": {
    "appId": "com.metod-admin.app",
    "directories": {
      "buildResources": "static"
    }
  },
  "scripts": {
    "dev": "cross-env NODE_ENV=DEV electron .",
    "dev:web": "cross-env NODE_ENV=DEV BUILD_TARGET=web  nuxt",
    "build": "nuxt build && electron-builder",
    "build:web": "cross-env nuxt build",
    "start": "cross-env nuxt build && nuxt start"
  },
  "dependencies": {
    "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
    "@babel/plugin-proposal-optional-chaining": "^7.0.0",
    "@babel/plugin-syntax-dynamic-import": "^7.0.0",
    "@babel/preset-env": "^7.1.0",
    "@babel/preset-flow": "^7.0.0",
    "apexcharts": "^2.0.9",
    "element-ui": "^2.4.7",
    "lockr": "^0.8.5",
    "nuxt": "^2.1.0",
    "nuxt-babel": "^0.1.2",
    "nuxt-i18n": "^5.3.0",
    "stylus": "^0.54.5",
    "stylus-loader": "^3.0.2",
    "underscore": "^1.9.1",
    "vue-apexcharts": "^1.2.1",
    "vue-lodash": "^2.0.0",
    "vue-wysiwyg": "^1.7.2",
    "vue2-editor": "^2.6.6",
    "vuedraggable": "^2.16.0"
  },
  "devDependencies": {
    "babel-eslint": "^8.2.1",
    "cross-env": "^5.2.0",
    "electron": "2.0.0-beta.7",
    "electron-builder": "^20.8.1",
    "electron-devtools-installer": "^2.2.3",
    "eslint": "^4.15.0",
    "eslint-friendly-formatter": "^3.0.0",
    "eslint-loader": "^1.7.1",
    "eslint-plugin-vue": "^4.0.0"
  }
}
terion-name

terion-name posted a new question

electron-template •

Cannot GET /

I've used this template, generated app. In dev mode everything works ok. But If I build the app I get this:

2018-10-05 11 53 58

package.json:

{
  "name": "metod-admin",
  "version": "1.0.0",
  "description": "METOD admin client",
  "author": "Terion <[email protected]>",
  "private": true,
  "main": "main.js",
  "build": {
    "appId": "com.metod-admin.app",
    "directories": {
      "buildResources": "static"
    }
  },
  "scripts": {
    "dev": "cross-env NODE_ENV=DEV electron .",
    "dev:web": "cross-env NODE_ENV=DEV BUILD_TARGET=web  nuxt",
    "build": "nuxt build && electron-builder",
    "build:web": "cross-env nuxt build",
    "start": "cross-env nuxt build && nuxt start"
  },
  "dependencies": {
    "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
    "@babel/plugin-proposal-optional-chaining": "^7.0.0",
    "@babel/plugin-syntax-dynamic-import": "^7.0.0",
    "@babel/preset-env": "^7.1.0",
    "@babel/preset-flow": "^7.0.0",
    "apexcharts": "^2.0.9",
    "element-ui": "^2.4.7",
    "lockr": "^0.8.5",
    "nuxt": "^2.1.0",
    "nuxt-babel": "^0.1.2",
    "nuxt-i18n": "^5.3.0",
    "stylus": "^0.54.5",
    "stylus-loader": "^3.0.2",
    "underscore": "^1.9.1",
    "vue-apexcharts": "^1.2.1",
    "vue-lodash": "^2.0.0",
    "vue-wysiwyg": "^1.7.2",
    "vue2-editor": "^2.6.6",
    "vuedraggable": "^2.16.0"
  },
  "devDependencies": {
    "babel-eslint": "^8.2.1",
    "cross-env": "^5.2.0",
    "electron": "2.0.0-beta.7",
    "electron-builder": "^20.8.1",
    "electron-devtools-installer": "^2.2.3",
    "eslint": "^4.15.0",
    "eslint-friendly-formatter": "^3.0.0",
    "eslint-loader": "^1.7.1",
    "eslint-plugin-vue": "^4.0.0"
  }
}
gaspergrom

gaspergrom posted a new bug report

electron-template •

bug cannot compile scss in electron-template

Version

v1.1.1

Reproduction link

https://codepen.io/gaspergrom/pen/bxQNgB

Steps to reproduce

in nuxt.config.js
i changed to
css: [
'@/assets/css/global.scss'
]
and it throws error

15888:0918/113806.973:ERROR:CONSOLE(7574)] "Extension server error: Object not found: ", source: chrome-devtools://devtools/bundled/inspector.js (7574)
ERROR Failed to compile with 1 errors11:38:07

This dependency was not found:

..\assets\css\global.scss in ./.nuxt/App.js
To install it, you can run: npm install --save ..\assets\css\global.scss

in normal nuxt structure i can easly add scss like this but in electron template i can't add it … i have to add css not scss

What is expected ?

to compile scss to css in nuxt structure

What is actually happening?

15888:0918/113806.973:ERROR:CONSOLE(7574)] "Extension server error: Object not found: ", source: chrome-devtools://devtools/bundled/inspector.js (7574)
ERROR Failed to compile with 1 errors11:38:07

This dependency was not found:

..\assets\css\global.scss in ./.nuxt/App.js
To install it, you can run: npm install --save ..\assets\css\global.scss

gaspergrom

gaspergrom posted a new question

electron-template •

cannot compile scss

in nuxt.config.js
i changed to
css: [
'@/assets/css/global.scss'
]
and it throws error

15888:0918/113806.973:ERROR:CONSOLE(7574)] "Extension server error: Object not found: <top>", source: chrome-devtools://devtools/bundled/inspector.js (7574)
ERROR Failed to compile with 1 errors11:38:07

This dependency was not found:

  • ..\assets\css\global.scss in ./.nuxt/App.js

To install it, you can run: npm install --save ..\assets\css\global.scss

in normal nuxt structure i can easly add scss like this but in electron template i can't add it … i have to add css not scss

FerVillanuevas

FerVillanuevas posted a new question

electron-template •

I cant use remote

i'm noob, just wanna close the app without frame

this is my code

<script> const remote = require('electron').remote export default { methods: { close () { remote.getCurrentWindow().close() } } } </script>

need some help please

braivre

braivre posted a new question

electron-template •

Create a Vue prototype in main.js

I want to use knexjs in my components and the only way I made it to work is creating the knexjs instance in the main.js (I also tried to do it in a plugin, but knex failed to run).
I realize that in the main.js there is a nuxt variable, so maybe is there a way to create a prototype and put the knexjs instance there? Something like this:
const nuxt = new Nuxt(config)
Vue.prototype.$knex = myknexinstance

skye-va

skye-va posted a new question

electron-template •

App just displays a white screen

Although everything looks fine when I run locally at http://localhost:3000/, the app that is built with Electron is just a blank white screen. I feel like I'm missing something obvious here!

esindger

esindger posted a new question

electron-template •

Electron Security Warning (Insecure Resources)

Hello, is there any way to fix this warning?
2018-05-12 11 44 55

Atinux

Atinux resolved the question #c4

electron-template •

do not open port in production

Hi @alidcastano

Actually next export is the equivalent of nuxt generate, but I believe server-side rendering is pretty useless in an Electron app, and by forcing the mode: spa, it will allow to avoid opening a port in production by serving the dist/ folder :)

yuchonghua

yuchonghua posted a new question

electron-template •

Use registerStreamProtocol and nuxt.render
git clone https://github.com/ddvjs/electron-test.git
cd electron-test
npm i
npm run dev
yuchonghua

yuchonghua posted a new question

electron-template •

do not open port in production,Use registerStreamProtocol and nuxt.render
git clone https://github.com/ddvjs/electron-test.git
cd electron-test
npm i
npm run dev
HoraceKeung

HoraceKeung posted a new question

electron-template •

I put together a new template

After understanding the nuxt starter template, this template and electron-quick-start template, I managed to put together a new template for vue-cli: https://github.com/HoraceKeung/nuxtron

Since there are differences compare to this template, for example the repo structure is so different since it is a template for creating new project via vue-cli and electron-builder is used by default to build the app, it may not a be a good idea to submit a pull request here. Any idea?

alexandesigner

alexandesigner posted a new question

electron-template •

[Question] Using this project

Today to use this repository it is necessary to make a clone, why not add it to vue-cli so that users can only start it with vue init nuxt-community/electron-template <folder>, there is some restriction so you have not done so?

If it is the case I can send a PR with the changes