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

package-lock.json should not be required #6

Closed
3 tasks done
scothis opened this issue Jan 25, 2019 · 4 comments
Closed
3 tasks done

package-lock.json should not be required #6

scothis opened this issue Jan 25, 2019 · 4 comments

Comments

@scothis
Copy link

scothis commented Jan 25, 2019

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?

packs v0.0.9

What version of the buildpack you are using?

5c4c6ec

If you were attempting to accomplish a task, what was it you were attempting to do?

Build a project with a package.json file but no package-lock.json.

Many projects will not have a package-lock.json as it's not required by npm, even though it is encouraged. If a project contains an npm-shrinkwrap.json file, the package-lock.json is completely ignored. Many npm alternatives will not generate a package-lock.json file.

What did you expect to happen?

The buildpack should detect and run npm install at build time.

What was the actual behavior?

The buildpack detects, but errors at buildtime.

[detector] 2019/01/25 19:42:37 NPM Buildpack: pass
...
[builder] -----> Node.js Buildpack 0.0.2
[builder] -----> NodeJS 11.4.0: Contributing to layer
[builder]        Downloading from https://nodejs.org/dist/v11.4.0/node-v11.4.0-linux-x64.tar.gz
[builder]        Verifying checksum
[builder]        Expanding to /workspace/org.cloudfoundry.buildpacks.nodejs/node
[builder]        Writing NODE_HOME to shared
[builder]        Writing NODE_ENV to shared
[builder]        Writing NODE_MODULES_CACHE to shared
[builder]        Writing NODE_VERBOSE to shared
[builder]        Writing NPM_CONFIG_PRODUCTION to shared
[builder]        Writing NPM_CONFIG_LOGLEVEL to shared
[builder]        Writing WEB_MEMORY to shared
[builder]        Writing WEB_CONCURRENCY to shared
[builder] -----> NPM Buildpack 0.0.3
[builder] unable to find "package-lock.json"
[builder] 2019/01/25 19:42:45 Error: failed to : exit status 102

Can you provide a sample app?

https://github.com/projectriff-samples/node-square/tree/10ee582a990eab43772f7d99d715740ddcee2b1b

Use projectriff/builder:0.2.0-snapshot-ci-f2315fde2cae as the builder image.

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/163493331

The labels on this github issue will be updated when the story is started.

@zmackie
Copy link
Contributor

zmackie commented Jan 29, 2019

@scothis Is this blocking you on anything at the moment? The issue certainly makes sense. We're in active development of this cnb and will be supporting more workflows as time goes on.

@scothis
Copy link
Author

scothis commented Jan 29, 2019

Not urgent as I was able to work around the issue by adding a package-lock.json.

@tylerphelan
Copy link
Contributor

Thanks for this issue @scothis! This has since been fixed and should be released!

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

No branches or pull requests

4 participants