Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read logo from svg file #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

read logo from svg file #22

wants to merge 2 commits into from

Conversation

A-Ortner
Copy link
Contributor

#13 added logo.svg and imported it so ballet logo svg is now read from file rather than module constant

@micahjsmith
Copy link
Contributor

Awesome, thanks for this contribution.

Let me know if you need advice on fixing the errors in CI, or I will wait to review until after the tests pass!

@micahjsmith
Copy link
Contributor

By the way, see the section on issue/PR references here (need to scroll down a few paragraphs to References). You can indicate that a PR will close another issue by using the keyword "close", "fix", etc. So Closes #13 will cause the issue to be closed, if just #13 then the issue will be referenced but needs to be closed manually

@A-Ortner
Copy link
Contributor Author

By the way, see the section on issue/PR references here (need to scroll down a few paragraphs to References). You can indicate that a PR will close another issue by using the keyword "close", "fix", etc. So Closes #13 will cause the issue to be closed, if just #13 then the issue will be referenced but needs to be closed manually

Thanks for the hint, I will do that next time!

@A-Ortner
Copy link
Contributor Author

Awesome, thanks for this contribution.

Let me know if you need advice on fixing the errors in CI, or I will wait to review until after the tests pass!

Thanks for the offer, I will have a look at it myself after work. I just did not have time for it yet.

@A-Ortner
Copy link
Contributor Author

Okay, I might need help on that one. As I understand it, "pip install .[test]", "pip install -e .[dev]", "pip install ." fail. But I cannot locally recreate these errors. Any ideas?

@micahjsmith
Copy link
Contributor

micahjsmith commented Jul 20, 2021

Okay @A-Ortner, digging into it I am able to reproduce locally. make install-develop fails during the jupyter labextension link step. The error message isn't helpful at first, same as on GH Actions. However, at least locally I can view the log file in /tmp. Relevant snippet below. Looks like some assumptions about paths aren't quite right.

> node /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/lib/python3.8/site-packages/jupyterlab/staging/yarn.js run build:dev:minimize
yarn run v1.21.1
$ jlpm run build:dev
$ jlpm run build
$ webpack
ModuleNotFoundError: Module not found: Error: Can't resolve '../resources/logo.svg' in '/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/ballet-assemble/lib'
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/webpack/lib/Compilation.js:925:10
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:401:22
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:130:21
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:224:22
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/neo-async/async.js:2830:7
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/neo-async/async.js:6877:13
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:214:25
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:213:14
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:285:5
    at eval (eval at create (/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:285:5
    at eval (eval at create (/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:285:5
    at eval (eval at create (/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:285:5
    at eval (eval at create (/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:285:5
    at eval (eval at create (/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:285:5
    at eval (eval at create (/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:285:5
    at eval (eval at create (/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/DirectoryExistsPlugin.js:27:15
    at /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:85:15
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
resolve '../resources/logo.svg' in '/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/ballet-assemble/lib'
  using description file: /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/ballet-assemble/package.json (relative path: ./lib)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/ballet-assemble/package.json (relative path: ./resources/logo.svg)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/ballet-assemble/resources/logo.svg doesn't exist
      .wasm
        Field 'browser' doesn't contain a valid alias configuration
        /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/ballet-assemble/resources/logo.svg.wasm doesn't exist
      .mjs
        Field 'browser' doesn't contain a valid alias configuration
        /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/ballet-assemble/resources/logo.svg.mjs doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/ballet-assemble/resources/logo.svg.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/ballet-assemble/resources/logo.svg.json doesn't exist
      as directory
        /Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/share/jupyter/lab/staging/node_modules/ballet-assemble/resources/logo.svg doesn't exist
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

JupyterLab failed to build
Traceback (most recent call last):

  File "/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/lib/python3.8/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

  File "/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/lib/python3.8/site-packages/jupyterlab/labextensions.py", line 104, in start
    build(clean_staging=self.should_clean,

  File "/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/lib/python3.8/site-packages/jupyterlab/commands.py", line 459, in build
    return handler.build(name=name, version=version, static_url=static_url,

  File "/Users/micahsmith/.pyenv/versions/3.8.3/envs/ballet-assemble/lib/python3.8/site-packages/jupyterlab/commands.py", line 661, in build
    raise RuntimeError(msg)

RuntimeError: JupyterLab failed to build

Exiting application: jupyter

@micahjsmith micahjsmith changed the title #13 logo is now read from svg file read logo from svg file Jul 22, 2021
@micahjsmith
Copy link
Contributor

@A-Ortner any luck debugging?

@A-Ortner
Copy link
Contributor Author

A-Ortner commented Jul 27, 2021

Can I manually start the CI tests?

EDIT: never mind, it just took a little longer to get started

@A-Ortner
Copy link
Contributor Author

It failed again. So, no luck.
The resources are there, it´s puzzling to me that they are not recognised.

@A-Ortner
Copy link
Contributor Author

It failed again. So, no luck.
The resources are there, it´s puzzling me that they are not recognised.

@micahjsmith
Copy link
Contributor

@A-Ortner are you able to reproduce the issue from running jupyter labextension link locally?

@A-Ortner
Copy link
Contributor Author

No, I cannot. I only pushed the changes when I did not get any errors locally anymore, but seemingly there were some factors I did not take into account. Could it be due to the fact that I use Windows?

@A-Ortner
Copy link
Contributor Author

Hey Micah, do you have any more ideas by chance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants