Comments (5)
I have managed to resolve the issue.
node_modules is not created or possibly removed when you do not specify in package.json npm install somewhere in the scripts section.
eg.
"scripts": {
"build": "npm install"
}
On previous releases of npm-install or with other buildpack this was not required.
from npm-install.
This seems very suspect. Can you provide us with some more details on what kind of app this is? What langauge-family buildpack you are using (Node.js? Web Servers?)? It might be very helpful to include examples of package.json
files that don't work correctly.
from npm-install.
We are migrating from Cloud Foundry onto AWS ECS so we are using Paketo to build OCIs that we can deploy. The Source code in question is here: https://github.com/uktrade/return-to-office/blob/master/package.json
This is a Django app, that takes care of the Web server, as per Procfile.
We run the following pack command.
pack build ${DOCKERREG}/${APP_NAME}
--tag ${DOCKERREG}${APP_NAME}:${GIT_TAG}
--builder paketobuildpacks/builder:0.2.263-full
--buildpack python
--buildpack nodejs
This is what pack detects.
[detector] 9 of 15 buildpacks participating
[detector] paketo-buildpacks/ca-certificates 3.5.1
[detector] paketo-buildpacks/cpython 1.8.4
[detector] paketo-buildpacks/pip 0.16.4
[detector] paketo-buildpacks/pip-install 0.5.9
[detector] paketo-buildpacks/python-start 0.14.3
[detector] paketo-buildpacks/procfile 5.5.0
[detector] paketo-buildpacks/node-engine 1.2.1
[detector] paketo-buildpacks/npm-install 1.0.3
[detector] paketo-buildpacks/node-run-script 1.0.2
Thanks.
fyi, I resolved this issue by updating package.json as per this.
https://github.com/uktrade/return-to-office/blob/copilot/package.json
from npm-install.
The issue is that you are using a Procfile
. No buildpack is requesting "node_modules" to be present at run time. npm-start
would do so, but you do not have a start
script defined in your package.json
. If you would add
"scripts": {
"start": "./scripts/entry.sh"
}
and get rid of the Procfile
the node_modules
would be present at runtime.
@ejayesh Your workaround works of course as well, but you are installing "node_modules" twice. Is there a reason why you *need a Procfile
?
from npm-install.
Related Issues (20)
- Implement RFC0044: Disable SBOM
- Different run-image and build-image users causing runtime failure HOT 2
- Failure: Create Draft Release workflow HOT 1
- Chmod fails when running as non-root user HOT 3
- Support Jammy Jellyfish
- A project with cached dependencies fails to start on subsequent builds HOT 2
- Failure: Create Draft Release workflow HOT 50
- Restarting o Docker Container results in errors executing the symlink script.
- Enable Debug Logging
- Build fails when `npm-cache` is supplied beforehand
- Failure: Go get update workflow HOT 3
- Project with a linked module fails with "Module not found" HOT 1
- build fails when using npm workspaces and `node_modules` is required during build and launch HOT 6
- Failure: Approve bot PR workflow HOT 1
- Locally installed packages not loading on container start
- Failure: Update GitHub config workflow
- Anchore Go Library - Vulnerabilities
- npm install is not installing devDependencies HOT 2
- Always overriding NODE_ENV with development HOT 1
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 npm-install.