Open IObert opened 5 years ago
offline=true
in .npmrc to be pushed to CF. So it is a dilemma for the broker...… (Not like golang, nodejs doesn't keep vendors in the repo.) Yeah you can just delete it and run npm install
. Or, a tricky way is to downgrade npm to 3.x (because older npm doesn't read project-level .npmrc, but your CF still knows it). Sorry for the inconvenience...Per the documentation here, the better option is prefer-offline=true
. Otherwise as is noted by @IObert, when building the service broker app, you must do the following on the bosh VM:
sudo npm install --offline=false --unsafe-perm=true --allow-root
rm ./package-lock.json
This forces the initial installation of all dependencies, which then allows the cf push
to work.
If a CF environment doesn't have access to NPM repo, the issue is mute if we choose prefer-offline=true
as the solution, since a pre-loaded node_modules will exist for those not able to pull them, and for those who don't have an issue accessing NPM repo, it will pull.
Hi,
I noticed that the line
offline=true
in the .npmrc file causes the following error (on two distinct machines):It works fine when I remove the line (I noticed that this line has been added because of #199 but I didn't encounter that problem)