By default, the node_modules will not be included into the content during the mbt build process. Whether there are some setting to force the mta to include the node_modules? As our project need to change some files after do the normal npm install'.
One trick I can figure out is that: we rename the "node_modules" to another name, and in the "start" script we build a softlink.
Request clarification before answering.
I find a way that can work:
1: use the "zip" builder, so it will zip all content
- name: test-simple-express-oo
type: nodejs
build-parameters:
builder: zip
path: ./app
parameters:
buildpack: nodejs_buildpack
2: Put the "node_modules" in the second level ( if put it in the first level, then the node-buildpack will overwrite it)
3: the "start" script in package.json will start the file in the second level. As it has the "node_modules" in the dir, so it can start successfully.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.