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

fix: remove package.json bin #83

Merged
merged 1 commit into from
Sep 27, 2023
Merged

fix: remove package.json bin #83

merged 1 commit into from
Sep 27, 2023

Conversation

malcyL
Copy link
Contributor

@malcyL malcyL commented Sep 27, 2023

After migrating to CDK V2 we are seeing an error on some npm install's of this library:

$ docker build .                                                                                                                                                      [44/1809]
[+] Building 24.9s (12/14)                                                                                                                                                                          docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                          0.0s
 => => transferring dockerfile: 584B                                                                                                                                                                          0.0s
 => [internal] load .dockerignore                                                                                                                                                                             0.0s
 => => transferring context: 53B                                                                                                                                                                              0.0s
 => [internal] load metadata for docker.io/library/node:18.17.1-bookworm                                                                                                                                      0.4s
 => [base 1/3] FROM docker.io/library/node:18.17.1-bookworm@sha256:933bcfad91e9052a02bc29eb5aa29033e542afac4174f9524b79066d97b23c24                                                                           0.0s
 => [internal] load build context                                                                                                                                                                             0.1s
 => => transferring context: 600.91kB                                                                                                                                                                         0.0s
 => CACHED [base 2/3] RUN apt-get update  && apt-get install -y     awscli     g++     git     make     openssh-client                                                                                        0.0s
 => CACHED [base 3/3] RUN npm install -g [email protected] [email protected]                                                                                                                                      0.0s
 => CACHED [stage-2 1/3] WORKDIR /var/manifesto-serverless                                                                                                                                                    0.0s
 => CACHED [npm_install 1/4] WORKDIR /manifesto-serverless                                                                                                                                                    0.0s
 => CACHED [npm_install 2/4] COPY package.json package.json                                                                                                                                                   0.0s
 => [npm_install 3/4] COPY package-lock.json package-lock.json                                                                                                                                                0.1s
 => ERROR [npm_install 4/4] RUN npm ci                                                                                                                                                                       24.3s
------                                              
 > [npm_install 4/4] RUN npm ci:                    

24.03 npm ERR! code ENOENT                                                                               
24.03 npm ERR! syscall chmod                       
24.03 npm ERR! path /manifesto-serverless/node_modules/talis-cdk-constructs/bin/cdk.js
24.03 npm ERR! errno -2                          
24.04 npm ERR! enoent ENOENT: no such file or directory, chmod '/manifesto-serverless/node_modules/talis-cdk-constructs/bin/cdk.js'
24.04 npm ERR! enoent This is related to npm not being able to find a file.
24.04 npm ERR! enoent                                                                                    
24.04                                             
24.04 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-09-27T09_17_17_844Z-debug-0.log
------                                      
Dockerfile:16                                
--------------------                                                                                     
  14 |     COPY package.json package.json
  15 |     COPY package-lock.json package-lock.json
  16 | >>> RUN npm ci
  17 |     
  18 |     FROM base
--------------------
ERROR: failed to solve: process "/bin/sh -c npm ci" did not complete successfully: exit code: 254

This is caused by the bin section in the package.json specifying cdk.js. This was in the package.json file generated by cdk init when the project was regenerated for CDK V2, and has not been removed.

This PR removes the problematic bin section in the package.json.

@malcyL malcyL merged commit e90e3f9 into main Sep 27, 2023
12 checks passed
@malcyL malcyL deleted the PLAT_6742_RemovePackageBin branch September 27, 2023 09:46
@talisaspire
Copy link
Collaborator

🎉 This PR is included in version 3.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants