linkedin / linkedin/eyeglass

Eyeglass import fails when nearest package.json doesn't contain eyeglass module

Open
#139 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

package:eyeglass
Dominant language
TypeScript
Stars
738
Forks
48
PR merge metrics
No merged PRs in 30d

Description

I thought the recent Windows bug was effecting my imports but now I understand that having multiple package.json files causes eyeglass modules to not be found.

Given the following structure:

```
package.json
gulpfile.js
Styles/
microsite/
|--Styles/
|--package.json
|--gulpfile.js
shared_feature/
|--Styles/
|--gulpfile.js

```

Eyeglass modules are declared in the root package.json file.
Styles built with the root folder gulpfile will see Eyeglass modules.
Styles built in: a folder where a package.json exists; or at a level below a package.json that isn't the root package.json (where Eyeglass modules are defined) will not recognize the Eyeglass modules.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the shown nested package.json and gulpfile.js layout, comparing a root build with one started below another package.json. Start by tracing how the gulpfile locates package.json and Eyeglass modules; done means nested builds recognize modules declared in the root package.json without breaking existing root builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, sass
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.