Closed Vector6662 closed 1 month ago
Hi @Vector6662,
Afaik the nodejs-buildpack sets NODE_ENV=production
by default which may be why devDependencies don't show up. I'd suggest that you move your vite
deps to the dependencies
block if you need them to run the app.
Hi @Vector6662,
Afaik the nodejs-buildpack sets
NODE_ENV=production
by default which may be why devDependencies don't show up. I'd suggest that you move yourvite
deps to thedependencies
block if you need them to run the app.
Hi @chombium , thanks for helping. It works!
What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running
cf curl /v2/info && cf version
?What version of the buildpack you are using?
nodejs_buildpack-cached-cflinuxfs4-v1.8.29.zip
If you were attempting to accomplish a task, what was it you were attempting to do?
I need to run
npm run start
to run my app, which will execute commandvite
- a npm dependency already installed in directorynode_modules/.bin/vite
. here is the location ofvite
, andpackage.json
file:package.json:
manifest.yaml:
In
manifest.yaml
I usels ./node_modules/.bin
to check ifvite
already in this directory.I then run
cf push
with vendoring app dependencies(include dirnode_modules
). However this is the output: So weired. Why it contains only a little part of it should does?The result of the command I runs locally:
BTW, I also tried to start app with command
npm run dev
(i.e. directly runs commandvite
), alse failed to start app, which meansvite
didn't in any environment variables either.What did you expect to happen?
vite
should be innode_modules/.bin
, because I uploaded it. but may it disappeared? So strange.What was the actual behavior?
desctiped above
Can you provide a sample app?
Please confirm where necessary: