Closed thorleifjacobsen closed 4 years ago
Hi,
Yes it seems there is an issue with the readme, you can use instead
grunt build-chrome-debug
Hi Thanks
Tried that earlier got this error. Not sure what this is about, kinda new to extension dev :) hehe.
Warning: Command failed: ./node_modules/.bin/crx pack build/all/ -p key.pem -o dist/chrome/passbolt-2.12.0-debug.crx && rm -f dist/chrome/passbolt-latest@passbolt.com.crx && ln -fs passbolt-2.12.0-debug.crx dist/chrome/passbolt-latest@passbolt.com.crx
events.js:174
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open '/home/toffe/Projects/passbolt_browser_extension/dist/chrome/passbolt-2.12.0-debug.crx'
Emitted 'error' event at:
at lazyFs.open (internal/fs/streams.js:272:12)
at FSReqWrap.oncomplete (fs.js:141:20)
Use --force to continue.
Hello @thorleifjaocbsen i'm not sure about the second issue this seems to be related to your file system permissions. Maybe the task cannot write in dist
or similar.
Hi, tried as SUDO same error. It says it could not find the "passbolt-2.12.0-debug.crx" not sure why it is not finding it.
The only place I could find "crx" referenced is in this grunt task:
build_chrome_debug: {
options: {
stderr: false
},
command: [
'./node_modules/.bin/crx pack ' + path.build + ' -p key.pem -o ' + path.dist_chrome + 'passbolt-' + pkg.version + '-debug.crx',
'rm -f '+ path.dist_chrome + 'passbolt-latest@passbolt.com.crx',
'ln -fs passbolt-' + pkg.version + '-debug.crx ' + path.dist_chrome + 'passbolt-latest@passbolt.com.crx'
].join(' && ')
},
So there must be something before it creating that crx first?
Ah, seems like it does not create the dist/chrome folder. I had to create the chrome folder manually.
mkdir -p build/chrome
mkdir -p dist/chrome
grunt build-chrome-debug
then it worked.
The dist/chrome folder is part of the code we ship, must have been deleted by another task you ran previously. Glad, you got it to work :)
Edit: Removing since it is not actual, had to remove and add extension to make it go away.
Followed to install this on chrome to debug and code.
Wrote "grunt" and tried to add unpacked extension to chrome, got error "manifest.json" not found. Did a grunt for chrome and now it complains about icons. Is the readme outdated?