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

dependency not found when installing component #1614

Closed
odedre opened this issue May 7, 2019 · 0 comments
Closed

dependency not found when installing component #1614

odedre opened this issue May 7, 2019 · 0 comments

Comments

@odedre
Copy link
Member

odedre commented May 7, 2019

Description

I have exported 2 components.

  1. The component with the code and tests.
  2. An internal component that holds the mocks for the tests and is comprised of .json files for the tests in the first component.
    When installing the first component, it doesn't seem to find the mock component.

Expected Behavior

Component should get installed and find all dependencies

Actual Behavior

Component dependency was not found.
It appears that the typescript compiler tried to compile json files

Output:

error /Users/oded/code/check-imdb/node_modules/@bit/open-apis.apis.imdb: Command failed.
Exit code: 1
Command: node .bit.postinstall.js
Arguments:
Directory: /Users/oded/code/check-imdb/node_modules/@bit/open-apis.apis.imdb
Output:
internal/modules/cjs/loader.js:584
throw err;
^

Error: Cannot find module '@bit/open-apis.apis.internal.mocks/dist/toxic-avenger-search.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.resolve (internal/modules/cjs/helpers.js:30:19)
at /Users/oded/code/check-imdb/node_modules/@bit/open-apis.apis.imdb/.bit.postinstall.js:27:32
at Array.map ()
at Object. (/Users/oded/code/check-imdb/node_modules/@bit/open-apis.apis.imdb/.bit.postinstall.js:24:23)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Steps to Reproduce the Problem

  1. run yarn add @bit/open-apis.apis.imdb@0.0.1

Specifications

  • Bit version: 14.1.0
  • Node version: v10.15.3
  • yarn version: 1.13.0
  • Platform: macOs
  • Bit compiler (include version): bit.envs/compilers/typescript@3.0.0
  • Bit tester (include version): bit.envs/testers/mocha@5.0.2
@odedre odedre added the type/bug label May 7, 2019
davidfirst added a commit that referenced this issue May 11, 2019
…component as packages because the package manager never install them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants