client icon indicating copy to clipboard operation
client copied to clipboard

make dev doesn't generate a manifest.json file

Open tgiardina opened this issue 4 years ago • 2 comments

Steps to reproduce

  1. git clone 'https://github.com/hypothesis/client.git'
  2. cd client
  3. make dev
  4. yarn link
  5. cd ../browser-extension
  6. yarn install
  7. yarn link hypothesis
  8. make

Expected behaviour

The browser extension should build per these guides: client and extension.

Actual behaviour

The final make command fails with make: *** No rule to make target 'node_modules/hypothesis/build/manifest.json', needed by 'build/client/build'. Stop.

Browser/system information

Ubuntu 20.04

Additional details

  • If you check the client's build directory, you can see that the manifest file is indeed missing. This can be resolved by running make build, but then I get a different set of issues (and since I'm not looking to run it in production, I think this is the wrong path to go down).
  • The client guide looks like it's out of date (if I run make in the client repo, I get the make help message), so maybe I'm doing something wrong? Is there up to date documentation?

tgiardina avatar Dec 11 '20 22:12 tgiardina

make dev definitely should generate the manifest.json file. Typical output from the command should look something like this:

[I]  ~/h/client > make dev
yarn install
yarn install v1.22.10
[1/4] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.47s.
node_modules/.bin/gulp watch
[09:49:23] Using gulpfile ~/hypothesis/client/gulpfile.js
[09:49:23] Starting 'watch'...
[09:49:23] Starting 'serve-package'...
[09:49:23] Starting 'serve-test-pages'...
[09:49:23] Starting 'watch-js'...
[09:49:23] Starting 'watch-css'...
[09:49:23] Starting 'watch-fonts'...
[09:49:23] Starting 'watch-images'...
[09:49:23] Starting 'watch-manifest'...
[09:49:23] Starting 'build-vendor-js'...
[09:49:23] Starting 'build-css'...
[09:49:23] Starting 'build-fonts'...
[09:49:23] Starting 'build-images'...
[09:49:23] Package served at http://localhost:3001/hypothesis
[09:49:23] Dev web server started at http://localhost:3000/
[09:49:24] Finished 'build-css' after 1.27 s
[09:49:24] Starting 'watchCSS'...
[09:49:25] Finished 'build-vendor-js' after 2.47 s
[09:49:25] Starting 'watchJS'...
[09:49:25] Finished 'build-fonts' after 2.48 s
[09:49:25] Starting 'watchFonts'...
[09:49:26] Finished 'build-images' after 3.64 s
[09:49:26] Starting 'watchImages'...
[09:49:27] Starting 'updateManifest'...
[09:49:29] Built boot.bundle.js
[09:49:31] Sidebar app URL: {current_scheme}://{current_host}:5000/app.html
[09:49:31] Notebook app URL: {current_scheme}://{current_host}:5000/notebook
[09:49:31] Client asset root URL: {current_scheme}://{current_host}:3001/hypothesis/1.0.0-dummy-version/
[09:49:31] Finished 'updateManifest' after 3.78 s
[09:49:31] Starting 'updateManifest'...
[09:49:31] Built polyfills-es2017.bundle.js
[09:49:31] Built annotator.bundle.js
[09:49:31] Built polyfills-es2018.bundle.js
[09:49:32] Finished 'updateManifest' after 657 ms
[09:49:32] Starting 'updateManifest'...
[09:49:32] Built sidebar.bundle.js
[09:49:32] Finished 'updateManifest' after 65 ms

The "Finished 'updateManifest' after..." lines indicate when the manifest.json file has been generated. Do you see these?

robertknight avatar Dec 16 '20 09:12 robertknight

I can reproduce this 100% of the time by running:

git clone 'https://github.com/hypothesis/client.git'
cd client
make dev

It hangs at Built sidebar.bundle.js:

yarn install
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 37.65s.
node_modules/.bin/gulp watch
[15:30:49] Using gulpfile ~/Documents/demos/client/gulpfile.js
[15:30:49] Starting 'watch'...
[15:30:49] Starting 'serve-package'...
[15:30:49] Starting 'serve-test-pages'...
[15:30:49] Starting 'watch-js'...
[15:30:49] Starting 'watch-css'...
[15:30:49] Starting 'watch-fonts'...
[15:30:49] Starting 'watch-images'...
[15:30:49] Starting 'watch-manifest'...
[15:30:49] Starting 'build-vendor-js'...
[15:30:49] Starting 'build-css'...
[15:30:49] Starting 'build-fonts'...
[15:30:49] Starting 'build-images'...
[15:30:49] Package served at http://localhost:3001/hypothesis
[15:30:49] Dev web server started at http://localhost:3000/
[15:30:51] Finished 'build-css' after 1.85 s
[15:30:51] Starting 'watchCSS'...
[15:30:52] Finished 'build-vendor-js' after 3.4 s
[15:30:52] Starting 'watchJS'...
[15:30:53] Finished 'build-fonts' after 3.45 s
[15:30:53] Starting 'watchFonts'...
[15:30:55] Finished 'build-images' after 6.09 s
[15:30:55] Starting 'watchImages'...
[15:30:57] Built boot.bundle.js
[15:31:00] Built annotator.bundle.js
[15:31:00] Built polyfills-es2017.bundle.js
[15:31:00] Built polyfills-es2018.bundle.js
[15:31:01] Built sidebar.bundle.js

That being said, if you run make dev again it seems to work. Previously it was hanging at sidebar.bundle.js every time, but I am no longer able to reproduce that.

Also, the documentation is outdated. make isn't a valid command (I'm assuming it should be make build).

tgiardina avatar Dec 18 '20 21:12 tgiardina