Git Product home page Git Product logo

Comments (7)

agdimech avatar agdimech commented on June 13, 2024 2

Seems that my latest fix isn't working. Upon inspecting the tar.gz there are no nested node_modules however locally I can see them. Will need to investigate into this further to see why the distributable doesn't match. Apologies.

from aws-pdk.

agdimech avatar agdimech commented on June 13, 2024

Are you able to please share a sample codebase so I can repro or provide steps to repro?

also have you tried deleting the lock file and running npm install first?

from aws-pdk.

tmokmss avatar tmokmss commented on June 13, 2024

@agdimech
You should be able to reproduce it by just running the two commands in the issue description.

More specifically:

$ mkdir pdk-repro
$ cd pdk-repro
$ npm init -y
$ npm install @aws/pdk
$ npm ci
npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.

And my environment:

$ npm --version
10.2.3
$ node --version
v20.10.0

also have you tried deleting the lock file and running npm install first?

This issue reproduces right after initializing a project by npm init -y.

from aws-pdk.

agdimech avatar agdimech commented on June 13, 2024

Thanks for the info.

The issue stems from the fact that bundleDependencies is not super well supported by pnpm (and most package managers) and at pack time, it just adds whatever is currently within the packages node_modules. This is problematic as most of the actual dependencies are stored in the root node_modules. We previously had a script that would link in any missing transitive bundleDependencies but this doesn't handle the case for multiple versions of the same package.

I re-worked all of this to use pnpm deploy which allows you to deploy a package to a new directory and install all deps directly in the node_modules in a flat fashion (similar to npm). This resolves the issues as now multiple package with the same version are correctly included via package node_modules nesting.

Here is the PR: #756

Apologies that you ran into this again, this should fix it once and for all :)

from aws-pdk.

tmokmss avatar tmokmss commented on June 13, 2024

Great to hear that. Looking forward to the new release :)

from aws-pdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.