Activities

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

alidcastano

alidcastano posted a new question

electron-template •

do not open port in production

Stumbled upon this article on how the Zeit team integrated Nex with Electron:
https://leo.im/2017/electron-next

One consideration they mention is not to open a port in production due to security vulnerabilities:

The reason why electron-next doesn't have the same behaviour in the final app as in development is that opening a port (like Next.js does it for providing hot reloading and auto-building of your code) is generally not a good idea because it introduces a security vulnerability on the user's device.

It's therefore safe for development, but not for production.

What's much safer, however, is letting the BrowserWindow instances directly access the static files of your renderer. This is made possible by next export, a new sub command that we've introduced with Next.js 3

I'm guessing next export is equivalent to running nuxt in --spa mode. So perhaps similar considerations can be applied to this template

cc @Atinux

alexisohayon

alexisohayon posted a new question

electron-template •

Axios breaks the loading?

Hi,

Nice package! I'm facing an issue that blocks the loading, apparently caused by the axios package (https://github.com/nuxt-community/axios-module).
I get a "Cannot read property 'env' of undefined" error :
capture d ecran 2017-11-17 a 16 23 08

Any idea how to fix this? :) Thanks!

lyric-index

lyric-index posted a new question

electron-template •

Cannot find module 'nuxt'

This problem occurs when I try to pack.

image

  • OS Version: Windows_NT ia32 10.0.16294
  • Node version: v8.6.0
  • NPM version: 5.4.2

Steps to Reproduce:

npm run package:win
(npm run build && electron-packager ./ nuxt-cli --platform=win32 --arch=x64 --version=1.7.8 --out=./ --overwrite --icon=favicon.ico --ignore=node_modules --prune)

image

alexchopin

alexchopin posted a new question

electron-template •

nuxtjs with electron `loadURL` is slow