You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using different collections for our components. In the last couple of days we have begun starting having issues when in a component from one collection, imports a component from another. The imported component then changes its dependency path to come from the first components collection.
For example, lets say we have a component "A" in collection "first", and component "B" in collection "second". "A" imports "B" from "'@'bit/.second.B". The component builds without problem and can be exported, with the correct dependencies.
However, if we install the component "A" as a npm package, the path in the import has changed to "'@'bit/.first.B", which leads to build failure.
Has anyone come across this issue and knows how it can be solved?
Steps to Reproduce
Tag the component
Export the component with correct dependencies
Install the exported component via npm
Get an error below :-
ERROR Failed to compile with 1 errors
This dependency was not found:
@bit/affin-hwang-am.misc.tac in ./node_modules/@bit/affin-hwang-am.misc.add-new-bank/dist/AddNewBank.js
To install it, you can run: npm install --save @bit/affin-hwang-am.misc.tac
Expected Behavior
The error specify that we are missing a module @bit/affin-hwang-am.misc.tac.
HOWEVER the missing module should be located at @bit/affin-hwang-am.transaction.tac as per what we had defined correctly at our source code when we exported the component.
Screenshots, exceptions and logs
Specifications
Bit version: 14.8.2
Node version: v12.14.1
npm / yarn version: 6.13.4
Platform: Windows
Bit compiler (include version): bit.envs/bundlers/vue@2.6.21
Bit tester (include version): none
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
mkdir my-worksapce
bit init
bit import bit.envs/compilers/babel --compiler
mkdir comp-b
touch comp-b/main.js
echo "export const a = 6;" > comp-b/main.js
bit add comp-b
bit tag comp-b
bit export scope1
mkdir comp-a
touch comp-a/main.js
bit add comp-a
bit tag comp-a
bit export scope2
echo "import {a} from '@bit/giladshoham.scope1.comp-b';" > comp-a/main.js
bit tag comp-a
bit export
npm i @bit/giladshoham.scope2.comp-a
now you can see in the comp-a in node_modules that in the src file you have import {a} from '@bit/giladshoham.scope1.comp-b'
but in the dist file you have import {a} from '@bit/giladshoham.scope2.comp-b'
This, of course, doesn't exist which leads to error in runtime
Describe the bug
We are using different collections for our components. In the last couple of days we have begun starting having issues when in a component from one collection, imports a component from another. The imported component then changes its dependency path to come from the first components collection.
For example, lets say we have a component "A" in collection "first", and component "B" in collection "second". "A" imports "B" from "'@'bit/.second.B". The component builds without problem and can be exported, with the correct dependencies.
However, if we install the component "A" as a npm package, the path in the import has changed to "'@'bit/.first.B", which leads to build failure.
Has anyone come across this issue and knows how it can be solved?
Steps to Reproduce
ERROR Failed to compile with 1 errors
This dependency was not found:
To install it, you can run: npm install --save @bit/affin-hwang-am.misc.tac
Expected Behavior
The error specify that we are missing a module @bit/affin-hwang-am.misc.tac.
HOWEVER the missing module should be located at @bit/affin-hwang-am.transaction.tac as per what we had defined correctly at our source code when we exported the component.
Screenshots, exceptions and logs
Specifications
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: