Running yarn copy fails due to missing files
Running yarn copy && ./firefox/mach build && yarn mochid for the first time on my machine (macOS) and I get this error:
$ node bin/copy --assets
Copying Files to ./firefox with params: { watch: false, assets: true, symlink: false }
[copy-assets] start
[copy-assets] copy static assets:
[copy-assets] - properties
[copy-assets] - preferences
[copy-assets] - index.html, index.js
[copy-assets] - moz.build
[copy-assets] - dwarf_to_json.wasm
[copy-assets] - dist/moz.build
[copy-assets] copy SVGs
(node:4640) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/dannyyang/code/debugger.html/firefox/devtools/client/jar.mn'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at updateFile (/Users/dannyyang/code/debugger.html/bin/copy-assets.js:28:17)
at copySVGs (/Users/dannyyang/code/debugger.html/bin/copy-assets.js:101:3)
at start (/Users/dannyyang/code/debugger.html/bin/copy-assets.js:231:3)
at module.exports (/Users/dannyyang/code/debugger.html/bin/copy-assets.js:318:12)
at start (/Users/dannyyang/code/debugger.html/bin/copy.js:19:9)
at Object.<anonymous> (/Users/dannyyang/code/debugger.html/bin/copy.js:23:1)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
(node:4640) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4640) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✨ Done in 0.93s.
-bash: ./firefox/mach: No such file or directory
It looks like it can't find the file './firefox/devtools/client/jar.mn'. Did you run ./bin/prepare-mochitests-dev or ./bin/download-firefox-artifact or use some other method to clone the https://hg.mozilla.org/mozilla-central/ repo into the ./firefox directory yet?
We should add this check to ./bin/copy so there is a warning
@jasonLaster do you mean display the warning if the firefox directory is missing or empty? Or would you check for something in particular?
I think the best solution here is:
- console out a warning saying that the file is missing and that they may need to run
./prepare-mochitest-dev - Update documentation if necessary.
/claim
Thanks for claiming the issue! :wave:
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!