Linux electron npm give me install-app-deps: not found - javascript

I'm trying to make my electron app work on linux. It's working fine on Windows.
When I'm trying a 'npm ci', I get the following error :
sh: 1: install-app-deps: not found
I haven't found anything usefull on google. I guess it could be my electron-forge who can be this trouble source, but I don't know any turn around for it.
My Package.json :
{
"name": "roseplayer",
"version": "0.0.2",
"description": "A webradio player",
"main": "main.js",
"scripts": {
"run": "electron .",
"test": "jest",
"postinstall": "install-app-deps",
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make"
},
"author": "Khan From Chedum",
"license": "ISC",
"dependencies": {
"electron-squirrel-startup": "^1.0.0",
"node-internet-radio": "^0.2.1",
"radio-browser": "^2.1.7",
"sqlite3": "^5.0.2"
},
"devDependencies": {
"#electron-forge/cli": "^6.0.0-beta.57",
"#electron-forge/maker-deb": "^6.0.0-beta.57",
"#electron-forge/maker-rpm": "^6.0.0-beta.57",
"#electron-forge/maker-squirrel": "^6.0.0-beta.57",
"#electron-forge/maker-zip": "^6.0.0-beta.57",
"electron": "^12.0.10"
},
"config": {
"forge": {
"packagerConfig": {
"icon": "./img/outline_filter_vintage_black_48dp.ico"
},
"makers": [
{
"name": "#electron-forge/maker-squirrel",
"config": {
"name": "roseplayer"
}
},
{
"name": "#electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "#electron-forge/maker-deb",
"config": {}
},
{
"name": "#electron-forge/maker-rpm",
"config": {}
}
]
}
}
}
My github : link
Thank you

I've found my mistake:
I'm using electron-forge and therefore I can't use npm install nor npm ci.
For more information, in case you're interested, you can go to the electron-forge home page.

Related

React Native .apk crash at launch but work on emulator

Since my last update, my build .apk app is not working anymore on Android. On emulator, the app is working properly but when i open it on phone, it's crash instantly.
package.json :
"name": "xxx",
"version": "0.9.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"#react-navigation/bottom-tabs": "^6.4.0",
"#react-navigation/native": "^6.0.13",
"#react-navigation/native-stack": "^6.9.0",
"axios": "^0.27.2",
"expo": "~46.0.13",
"expo-secure-store": "~11.3.0",
"expo-splash-screen": "~0.16.2",
"expo-status-bar": "~1.4.0",
"expo-updates": "^0.14.6",
"react": "18.0.0",
"react-native": "0.69.6",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "^4.3.1",
"react-native-screens": "~3.15.0"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
app.json :
"expo": {
"name": "name",
"slug": "name",
"version": "0.9.0",
"orientation": "portrait",
"icon": "./src/assets/icon_android.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./src/assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#fff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./src/assets/icon_android.png",
"backgroundColor": "#FFFFFF"
},
"package": "xx.xxx.xx"
},
"web": {
"favicon": "./src/assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "myid"
}
}
}
}
Thank you to everyone who will help me! from what i could see on similar problems, it could come from the packages
I ended up starting from an old save which allowed me to isolate the problem:
it seems that the expo-updates package crashes the app if present in package.json

NODE & ELECTRON No valid versions available for electron-navigation

i tried to build a open source "Browser that allow flash player"
My problem is, when i use "npm install"
it's return me this error:
npm ERR! code ENOVERSIONS
npm ERR! No valid versions available for electron-navigation
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\rstei\AppData\Roaming\npm-cache\_logs\2021-08-18T13_30_37_799Z-debug.log
My package.json:
{
"name": "Misaki",
"productName": "Flash Browser",
"description": "Electron Browser For Games",
"homepage": "https://www.flashbrw.com",
"author": "Misaki",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "electron .",
"publish": "electron-builder --win -p always",
"build": "electron-builder --win"
},
"license": "ISC",
"devDependencies": {
"electron": "^9.0.5",
"electron-builder": "22.9.1"
},
"dependencies": {
"electron-navigation": "^1.5.8",
"electron-updater": "4.3.5"
},
"build": {
"appId": "com.flashbrw.app",
"extraResources": [
"./plugins/**"
],
"directories": {
"buildResources": "resources",
"output": "release"
},
"publish": [
{
"provider": "github",
"owner": "asteroid-dev",
"repo": "FlashBrowser"
}
],
"win": {
"target": [
{
"target": "nsis",
"arch": [
"x64",
"ia32"
]
}
]
},
"nsis": {
"installerIcon": "icon.ico",
"uninstallerIcon": "icon.ico",
"uninstallDisplayName": "Flash Browser",
"oneClick": true,
"perMachine": false,
"artifactName": "FlashBrowser.${ext}"
}
}
}
if you want see the open source: https://github.com/asteroid-dev/FlashBrowser
Thanks in advance for someone can find a way for fix it !
Your project specifies a non-existent version of the electron-navigation module.
Your package.json calls for "electron-navigation": "^1.5.8". The version specifier, ^1.5.8, permits any version greater than or equal to 1.5.8 and below 2.0.0.
However, it appears the only available version of that package is version 6.6.6. You can confirm this from the command line:
$ npm show electron-navigation versions
6.6.6
The specifier ^1.5.8 does not accept 6.6.6.
I can only guess why your project is asking for such a precise but non-existent version. Change the specifier to ^6.6.6, and it should install fine.

published an npm package but installing it just has bare bones files

so I have published an npm package but when I installed it, it didn't pull any of the code from my github repo. Instead, it just has the node_modules
{
"name": "asdf",
"version": "1.0.3",
"description": "asdf",
"main": "index.js",
"dependencies": {
"got": "^9.6.0"
},
"devDependencies": {},
"scripts": {
"start": "node index.js"
},
"bin" : { "asdf" : "index.js" },
"files": [
"index.js"
],
"repository": {
"type": "git",
"url": "git+https://github.com/asdf/asdf.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/asdf/asdf/issues"
},
"homepage": "https://asdf"
}
What I expected was to have the index.js it pulls from git repo which is public.

configuration issue with npm-watch -- not hearing changes in some cases

I am working on a build script that uses rollup along with other tools to build stuff. Everything works well individully, but npm-watch is being very selective in what it listens to. I have confiured it to use four different eatches, but only one (watch:js) responds. Here is a link to the repo. Here is the package.json:
{
"name": "es6_rollup_seed",
"version": "1.0.0",
"description": "an npm build environment that implements rollup.js",
"main": "index.js",
"watch": {
"watch:html": {
"patterns": [
"src"
],
"extensions": "html"
},
"watch:js": {
"patterns": [
"src/js"
],
"extensions": "js"
},
"watch:img": {
"patterns": [
"src/img"
],
"extensions": "jpg,png,svg,gif"
},
"watch:css": {
"patterns": [
"src/scss"
],
"extensions": "scss"
}
},
"scripts": {
"test": "npm run test",
"start": "run-s init:*",
"init:create-folders": "mkdirp build/js build/css build/img",
"init:copy-content": "run-s copy-html",
"init:start": "run-p serve watch:*",
"serve": "lite-server -c bs-config.json",
"watch:html": "npm-watch copy-html",
"watch:js": "npm-watch compile-js",
"watch:img": "npm-watch copy-images",
"watch:css": "npm-watch compile-css",
"copy-html": "cpx src/*.html build",
"copy-images": "cpx src/img/*.* build/img",
"compile-js": "rollup -c",
"compile-css": "node-sass --output-style expanded --source-map true src/scss/app.scss --output build/css"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sean-olson/build_environments.git"
},
"keywords": [
"rollup",
"build",
"tool",
"npm"
],
"author": "Sean Olson",
"license": "MIT",
"bugs": {
"url": "https://github.com/sean-olson/build_environments/issues"
},
"homepage": "https://github.com/sean-olson/build_environments#readme",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-preset-es2015-rollup": "^3.0.0",
"cpx": "^1.5.0",
"lite-server": "^2.3.0",
"node-sass": "^4.7.2",
"npm-run-all": "^4.1.2",
"npm-watch": "^0.3.0",
"rollup": "^0.56.5",
"rollup-plugin-babel": "^3.0.3",
"rollup-plugin-commonjs": "^9.0.0",
"rollup-plugin-node-resolve": "^3.2.0",
"rollup-plugin-replace": "^2.0.0"
}
}
The solution is to use another module, in this case watch-cli

How resolve "Error: invalid reporter "html-cov"" in nodejs

package.json
{
"name": "learningmocha",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "mocha && mocha test --require blanket --reporter html-cov > coverage.html"
},
"author": "",
"license": "ISC",
"devDependencies": {
"blanket": "^1.2.3",
"chai": "^3.5.0",
"mocha": "^3.2.0"
},
"config": {
"blanket": {
"pattern": [ "index.js" ],
"data-cover-never": "node-module"
}
}
}
I am using Mocha for testing in nodejs. when i run npm test after adding html-cov in the test script of my package.json as show above then it give me error
"Error: invalid reporter "html-cov"
You can see more in this image
html-cov was dropped in 3.0.0 [1]
[1] https://github.com/mochajs/mocha/issues/2356

Categories