Comments (9)
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.
Have tried multiple fixes on my end to no avail. This is actually a bug with npm as per: npm/cli#6787
The only fix for this at the moment is to either:
- Use and older version of npm (7.0.8 works) which is the last known version of npm that didn't have the bug 😢
- run
npm i && npm i
from aws-pdk.
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.
@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.
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.
Great to hear that. Looking forward to the new release :)
from aws-pdk.
Been doing some more digging and the actual tgz file looks correct locally, but for some reason it is missing the nested node_modules
on the CI publishing workflow. Could potentially be a versioning issue with pnpm/npm, will keep digging.
from aws-pdk.
This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.
from aws-pdk.
Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen. If you wish to exclude this issue from being marked as stale, add the "backlog" label.
from aws-pdk.
Related Issues (20)
- [BUG] Upgrading core pdk code results in reverting back to the original versions. HOT 5
- [BUG] Passing a smithy api to Infrastructure results in namespace being prepended in the variable and class name HOT 2
- [BUG] type-safe-api appending "operation" to some operationIds HOT 3
- [BUG] Python Lambda handlers in type-safe-api can't import runtime module HOT 1
- [DOCS] Getting Started - Incorrect JDK install links HOT 2
- [BUG] typesafe-api code generation script doesn't handle spaces in the directory path HOT 2
- [BUG] (short issue description)Codegen for mocks fails on filename case mismatch. HOT 3
- Publishing vv0.23.42 to maven failed
- [BUG] (Maven plugin executions synthesized incorrectly) HOT 2
- [FEATURE] (allow sorting of pom.xml plugins for maven) HOT 2
- Publishing vv0.23.44 to maven failed
- [FEATURE] Add support for RuleActionOverrides for WAF using TypeSafeApi constructs
- Publishing vv0.23.44 to maven failed HOT 1
- [BUG] several deprecated dependencies in monorepo-ts template
- [BUG] MonorepoTsProject should lint .projenrc.ts and projenrc/**.ts
- [FEATURE] Add ability to customize outputSpecLocation S3 bucket for type-safe-rest-api PrepareApiSpecCustomResource HOT 1
- [BUG] (type-safe-api) install fails on python runtime package with missing README HOT 1
- [BUG] type-safe-api build fails when AWS_PDK_VERSION is not set in the environment
- [FEATURE] (type-safe-api) only require OpenApi Generator when API changes HOT 1
- [FEATURE] Return error message sent from backend instead of standard message in ResponseError
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-pdk.