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

Docs: unable to clone & install for development #415

Closed
dreamorosi opened this issue Jan 5, 2022 · 7 comments · Fixed by #417
Closed

Docs: unable to clone & install for development #415

dreamorosi opened this issue Jan 5, 2022 · 7 comments · Fixed by #417
Assignees
Labels
documentation Improvements or additions to documentation not-a-bug New and existing bug reports incorrectly submitted as bug rejected This is something we will not be working on. At least, not in the measurable future

Comments

@dreamorosi
Copy link
Contributor

Bug description

Reported by @michaelbrewer on the Slack Dev channel.

screen_shot_2022-01-05_at_10 45 22_am

Unable to install package after clean clone of repo, see screenshot above.

Expected Behavior

Be able to git clone ... & npm install.

Current Behavior

Throws an error for missing import of @aws-lambda-powertools/commons (see screenshot).

Possible Solution

N/A

Steps to Reproduce

  1. git clone
  2. npm i

Environment

  • Powertools version used: 0.2.0
  • Packaging format (Layers, npm): npm
  • AWS Lambda function runtime: N/A - local development
  • Debugging logs:
npm --version
8.3.0
node --version
17.3.0

Running on Apple Silicon

Related issues, RFCs

N/A

@dreamorosi dreamorosi added bug Something isn't working triage This item has not been triaged by a maintainer, please wait labels Jan 5, 2022
@michaelbrewer
Copy link
Contributor

Following Makefile works for me now when i run make dev

dev:
	cd packages/commons; npm ci
	cd packages/logger; npm ci
	cd packages/metrics; npm ci
	cd packages/tracing; npm ci
	npm ci
	npm run init-environment

michaelbrewer added a commit to michaelbrewer/aws-lambda-powertools-typescript that referenced this issue Jan 5, 2022
Changes:
- Update CONTRIBUTING.md to use
> aws-lambda-powertools-typescript@0.0.1 preinstall
> (cd packages/commons && npm ci); (cd packages/logger && npm ci); (cd packages/metrics && npm ci); (cd packages/tracing && npm ci);

> @aws-lambda-powertools/commons@0.2.0 prepare
> npm run build

> @aws-lambda-powertools/commons@0.2.0 build
> tsc

added 586 packages, and audited 587 packages in 4s

84 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> @aws-lambda-powertools/logger@0.2.0 prepare
> npm run build

> @aws-lambda-powertools/logger@0.2.0 build
> tsc

added 488 packages, and audited 489 packages in 4s

72 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> @aws-lambda-powertools/metrics@0.2.0 prepare
> npm run build

> @aws-lambda-powertools/metrics@0.2.0 build
> tsc

added 822 packages, and audited 852 packages in 10s

91 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> @aws-lambda-powertools/tracer@0.2.0 prepare
> npm run build

> @aws-lambda-powertools/tracer@0.2.0 build
> tsc

added 836 packages, and audited 859 packages in 8s

72 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

added 1327 packages, removed 2761 packages, changed 10 packages, and audited 1383 packages in 40s

100 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
- Add a preinstall task to install all of the sub packages

closes aws-powertools#415
@michaelbrewer
Copy link
Contributor

A fix is up, to confirm it works just run:

git clean -fdx
npm ci
npm run init-environment
npm run test

michaelbrewer added a commit to michaelbrewer/aws-lambda-powertools-typescript that referenced this issue Jan 5, 2022
Changes:
- Update CONTRIBUTING.md to use npm ci
- Add a preinstall task to install all of the sub packages

closes aws-powertools#415
@simonireilly
Copy link

simonireilly commented Jan 6, 2022

Looks like the packages don't know how to build their references.

// packages/metrics/tsconfig.json
  "references": [
    {
      "path": "../commons"
    }
  ]

Use this to declare a list of modules this package depends on.

When running tsc --build it will build its references first, then import them.

When using vscode it does this in a background thread continuously to maintain accurate intellisense.

I can put a PR in for this, as it's probably the long term fix, over maintaining a topographical build command.

@michaelbrewer
Copy link
Contributor

@simonireilly - cool. i just wanted a fix to allow for people to work from the project :)

@simonireilly
Copy link

@simonireilly - cool. i just wanted a fix to allow for people to work from the project :)

Totally, user experience and pragmatism first 🙏

@michaelbrewer
Copy link
Contributor

@simonireilly - i updated the PR to make the project references work

@dreamorosi PR is ready to review

dreamorosi pushed a commit that referenced this issue Jan 12, 2022
* fix(build): Update contributing.md and fix npm ci

Changes:
- Update CONTRIBUTING.md to use
> aws-lambda-powertools-typescript@0.0.1 preinstall
> (cd packages/commons && npm ci); (cd packages/logger && npm ci); (cd packages/metrics && npm ci); (cd packages/tracing && npm ci);

> @aws-lambda-powertools/commons@0.2.0 prepare
> npm run build

> @aws-lambda-powertools/commons@0.2.0 build
> tsc

added 586 packages, and audited 587 packages in 4s

84 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> @aws-lambda-powertools/logger@0.2.0 prepare
> npm run build

> @aws-lambda-powertools/logger@0.2.0 build
> tsc

added 488 packages, and audited 489 packages in 4s

72 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> @aws-lambda-powertools/metrics@0.2.0 prepare
> npm run build

> @aws-lambda-powertools/metrics@0.2.0 build
> tsc

added 822 packages, and audited 852 packages in 10s

91 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> @aws-lambda-powertools/tracer@0.2.0 prepare
> npm run build

> @aws-lambda-powertools/tracer@0.2.0 build
> tsc

added 836 packages, and audited 859 packages in 8s

72 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

added 1327 packages, removed 2761 packages, changed 10 packages, and audited 1383 packages in 40s

100 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
- Add a preinstall task to install all of the sub packages

closes #415

* fix(build): Update contributing.md and fix npm ci

Changes:
- Update CONTRIBUTING.md to use npm ci
- Add a preinstall task to install all of the sub packages

closes #415

* chore: leave as npm install for now

* fix(all): setup up project references

* docs: update to use npm ci
@github-actions
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@dreamorosi dreamorosi added this to the production-ready-release milestone Feb 28, 2022
@dreamorosi dreamorosi removed the triage This item has not been triaged by a maintainer, please wait label Oct 19, 2022
@dreamorosi dreamorosi added documentation Improvements or additions to documentation rejected This is something we will not be working on. At least, not in the measurable future not-a-bug New and existing bug reports incorrectly submitted as bug and removed bug Something isn't working labels Nov 14, 2022
@dreamorosi dreamorosi self-assigned this Nov 14, 2022
@dreamorosi dreamorosi changed the title bug(all): unable to clone & install for development Docs: unable to clone & install for development Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation not-a-bug New and existing bug reports incorrectly submitted as bug rejected This is something we will not be working on. At least, not in the measurable future
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants