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

Dev installation instructions incur an error #7692

Closed
jasongrout opened this issue Dec 24, 2019 · 0 comments · Fixed by #7691
Closed

Dev installation instructions incur an error #7692

jasongrout opened this issue Dec 24, 2019 · 0 comments · Fixed by #7691
Labels
status:resolved-locked
Milestone

Comments

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented Dec 24, 2019

Description

jlpm run build on a clean pip install prints out an error on current master (023828a)

Reproduce

  1. pip install -ve .
  2. jlpm run build

Gives an error:

(node:35285) UnhandledPromiseRejectionWarning: Error: Cannot find module 'react-json-tree/package.json'
Require stack:
- /[snip]/jupyterlab/buildutils/lib/utils.js
- /[snip]/jupyterlab/buildutils/lib/ensure-repo.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:713:15)
    at Function.Module._load (internal/modules/cjs/loader.js:618:27)
    at Module.require (internal/modules/cjs/loader.js:771:19)
    at require (internal/modules/cjs/helpers.js:68:18)
    at requirePackage (/[snip]/jupyterlab/buildutils/lib/utils.js:305:20)
    at /[snip]/jupyterlab/buildutils/lib/utils.js:280:31
    at Array.forEach (<anonymous>)
    at /[snip]/jupyterlab/buildutils/lib/utils.js:271:27
    at Array.forEach (<anonymous>)
    at Object.getPackageGraph (/[snip]/jupyterlab/buildutils/lib/utils.js:267:25)

This stems from a couple of things:

  1. react-json-tree is for some reason not hoisted into the root node_modules, but instead lives in ./packages/json-extension/node_modules/react-json-tree
  2. The test at
    parentModulePath = require.resolve(parentModule);
    fails initially because Error: Cannot find module '/[snip]/jupyterlab/node_modules/@jupyterlab/json-extension/lib/index.js'. Please verify that the package.json has a valid "main" entry, so it falls through to the catch. However, it really failed because the json-extension package wasn't built yet, so the lib/ directory didn't exist.

This error goes away once the json-extension package is built, i.e., the second time jlpm run build is run.

I'm not sure why react-json-tree is not hoisted to the root node_modules.

@jasongrout jasongrout added this to the 2.0 milestone Dec 24, 2019
@lock lock bot added the status:resolved-locked label Jan 30, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant