#err file not found in 'app.asar'

56 messages · Page 1 of 1 (latest)

round geyser
#

nobody can help you if you don't provide your config

idle citrus
#

which config

#

which config file ?

round geyser
#

packager config

idle citrus
round geyser
#

I will make a wild guess, this file is not packaged because you are not importing it anywhere

idle citrus
#

yes true , in other case i have to update my code to use an import statement
but in this case am not importing it

round geyser
#

try to use packagerConfig.extraResource to add it in the package

idle citrus
#

i update my code to that but am still getting the same error

round geyser
#

extraResource: string | string[]

#

not object[]

idle citrus
#

yes true

#

same nothing changes

#

changed

#

even when i unpack my app.asar i don't see the file there

round geyser
#

maybe you haven't put the right path

idle citrus
#

the path sould be './src/style.json' , src is in the same directory as config file , but the same error !!!!

subtle plank
#

resources are in different path

#

not inside of app

#

resources/style.json

#

resources/app.asar

idle citrus
#

the style.json file is inside src folder

#

so the path to passe to extraResources should "./src/myfile"

subtle plank
#

extraResources copy you file from path_a to path_b

idle citrus
#

i know, but it's not working for me

subtle plank
#

show your resources folder

#

for packaged app

idle citrus
#

i mean look, the path am provding is correct and still can't see the file on my app.asar

subtle plank
#

show resources folder

idle citrus
#

resoureces/app.asar

#

resources/app.asar

subtle plank
#

your config throw an error

#

on package

#

are you sure you repackage it?

idle citrus
#

yes am using npm run make each time

#

it was a typo

#

extraResources angrysad

idle citrus
#

please can any one help still facing the same problem

#

even tho i fix the typo nothing changed

subtle plank
#

do you have files in resource folder?

idle citrus
#

i fix it and now i can see the file in resources folder, i think i were puting a property that does not exist "admin" before the extraResource property and that's why it was not working

subtle plank
#

what purpose to read json file?

#

instead of import it?

idle citrus
#

am not read only am writing to

subtle plank
#

in production app you cant write to app files

#

so this part will not work

idle citrus
#

am using it in my app demo version and am writing the date to that file, am passing an array that contains an encrypted date along with the encrypt key and iv

subtle plank
#

as i said

idle citrus
subtle plank
#

you cant write to app files

#

if you want to work with it file should be outside