Skip to content

Yarn missing module files generated from 'prepare' hook #7778

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

Closed
kicktheken opened this issue Dec 23, 2019 · 2 comments
Closed

Yarn missing module files generated from 'prepare' hook #7778

kicktheken opened this issue Dec 23, 2019 · 2 comments

Comments

@kicktheken
Copy link

Bug: yarn missing module files generated from 'prepare' hook

Setup

Yarn v1.21.1
macOS 10.15.2
node v12.13.1

Steps to Reproduce

yarn add https://github.com/kicktheken/PIXI.TextInput

Expected behavior

> find node_modules/pixi-text-input/dist
node_modules/pixi-text-input/dist
node_modules/pixi-text-input/dist/app
node_modules/pixi-text-input/dist/app/TextInput.js
node_modules/pixi-text-input/dist/app/DefaultBoxGenerator.d.ts
node_modules/pixi-text-input/dist/app/DefaultBoxGenerator.js
node_modules/pixi-text-input/dist/app/TextInput.d.ts
node_modules/pixi-text-input/dist/index.js
node_modules/pixi-text-input/dist/index.d.ts

Actual behavior

> find node_modules/pixi-text-input/dist
node_modules/pixi-text-input/dist
node_modules/pixi-text-input/dist/index.js

I did npm i https://github.com/kicktheken/PIXI.TextInput (with npm v6.13.4) and the expected files exists so this looks like a bug in yarn

@rally25rs
Copy link
Contributor

duplicate of #5235 which looks like it would be addressed by #6131 but it has been sitting open for quite a while.

@tpai
Copy link

tpai commented Jan 7, 2020

Just in case someone came for the solution, it seems Yarn respect .gitignore while building artifact, that cause everything inside dist/ will be ignored except the file which specified at main field of package.json which is dist/index.js.

According to #5235 , there are three workarounds for this:

  • Modify .gitignore to not ignore dist/.
  • Add .npmignore, Yarn respect it over .gitignore.
  • Specify dist/ at files field in package.json.

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

No branches or pull requests

3 participants