Code Monkey home page Code Monkey logo

nodejs-npm-buildpack's People

Contributors

danielleadams avatar elbandito avatar hone avatar jabrown85 avatar jkutner avatar jud avatar lassebe avatar lillianzhang331 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodejs-npm-buildpack's Issues

Cannot access the `.git` using this buildpack?

Hi there

I'm struggling with running some git commands while using this buildpack

$(git show -s --format=%cd --date=short)--$(git rev-parse HEAD)

results in

fatal: not a git repository (or any of the parent directories): .git

Is there a config option that I might be missing, or is it a limitation of the buildpack that the .git directory is not accessible?

Hoping I might possibly be missing something obvious 🙏 (otherwise please consider this a feature request to make the .git directory available to build scripts)

Yarn support

The nodejs-engine-buildpack installs yarn if a yarn.lock file is present. This buildpack should run yarn instead of npm if yarn is available. This will ensure the lock file is respected.

jq: Permission denied

Machine/OS Details:

 4.4.0-146-generic #172-Ubuntu SMP Wed Apr 3 09:00:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:    16.04
Codename:    xenial

$ docker -v
Docker version 18.09.3, build 774a1f4

I'm consistently seeing the following issue when trying to build an Evergreen function on my Linux machine. It looks like some kind of permission error when trying to install/execute jq. I can't reproduce this on my Mac, so it seems to be isolated to Linux.

Building image sf-fx-hello-224-test-us-image... failed
 ›   Error: BUILD SETTINGS
 ›   Error: -------------------------------------------------------
 ›   Error: Builder: heroku/functions-buildpacks
 ›   Error: Buildpacks: []
 ›   Error: Clear Cache: false
 ›   Error: Image: sf-fx-hello-224-test-us-image
 ›   Error: No Pull: false
 ›   Error: Publish: false
 ›   Error: Run Image: heroku/pack:18
 ›   Error: Working Directory: .
 ›   Error: -------------------------------------------------------
 ›   Error: Starting build
 ›   Error: Pulling image 'index.docker.io/heroku/functions-buildpacks:latest'
 ›   Error: latest: Pulling from heroku/functions-buildpacks
...
 ›   Error: ===> DETECTING
 ›   Error: [detector] ======== Results ========
 ›   Error: [detector] pass: heroku/[email protected]
 ›   Error: [detector] pass: heroku/[email protected]
 ›   Error: [detector] pass: heroku/[email protected]
 ›   Error: [detector] Resolving plan... (try #1)
 ›   Error: [detector] Success! (3)
 ›   Error: ===> RESTORING
 ›   Error: [restorer] Cache '/cache': metadata not found, nothing to restore
 ›   Error: ===> ANALYZING
 ›   Error: [analyzer] Image 'index.docker.io/library/sf-fx-hello-224-test-us-image:latest' not found
 ›   Error: ===> BUILDING
 ›   Error: [builder] ---> Node.js Buildpack
 ›   Error: [builder] ---> Installing tools:
 ›   Error: [builder] jq
 ›   Error: [builder] yj
 ›   Error: [builder] ---> Getting Node version
 ›   Error: [builder] /cnb/buildpacks/heroku_nodejs-engine-buildpack/0.3.0/lib/utils/json.sh: line 8: /layers/heroku_nodejs-engine-buildpack/toolbox/bin/jq: Permission denied
 ›   Error: [builder] Error: failed to build: exit status 1
 ›   Error: failed with status code: 7

use_npm_ci() function returns true when my node version is 5.6.0

So I found that the use_npm_ci() function returns true if my npm version is exactly 5.6.0. For this reason the build is trying to use npm ci command. Unfortunately npm 5.6.0 does not have ci command so the build fails.

Correct behaviour should be that when my npm is 5.6.0 it should return false to use the npm install command in the build function.

WebSocket server doesn't work on Heroku

Hello, I'm having an issue with the websocket server.
I have an app running with a GraphQL API running on it, and a WebSocket server. Everything works fine on local, but when I upload the app to Heroku, the URL for the ws server returns error 404.
As the app URL is https://ethyme-api.herokuapp.com/, i think the ws server one is wss://ethyme-api.herokuapp.com/, but it doesnt work. Can you help me ?

ENOENT: no such file or directory, lstat '/layers/heroku_nodejs-npm/npm'

Testing heroku/buildpacks:18 with a nodejs project and getting an error when the npm version is specified in package.json. The build succeeds if the npm version is removed from package.json.

Running pack build -v --builder=heroku/buildpacks:18 example-app outputs:

[...snip...]
===> BUILDING
---> Node.js Buildpack
---> Setting NODE_ENV to production
---> Installing toolbox
---> Getting Node version
---> Resolving Node version
---> Downloading and extracting Node v15.2.0
---> Parsing package.json
---> No file to start server
---> either use 'docker run' to start container or add index.js or server.js
npm notice
npm notice New patch version of npm available! 7.0.8 -> 7.0.10
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.0.10>
npm notice Run `npm install -g [email protected]` to update!
npm notice
---> Installing npm v6.x from package.json
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path /layers/heroku_nodejs-npm/npm
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, lstat '/layers/heroku_nodejs-npm/npm'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Here is a minimal package.json to reproduce the issue.

{
  "name": "example-app",
  "version": "1",
  "engines": {
    "node": "15.x",
    "npm": "6.x"
  },
  "dependencies": {
    "chai": "^4.2.0",
    "dotenv": "^8.2.0"
  }
}

Broken No launch.toml process type

Node builds do not function, and it appears to be as a result of no defined processes in launch.toml (which is not added here).

Given:

git clone https://github.com/heroku/node-js-getting-started.git
cd node-js-getting-started
pack build --builder heroku/buildpacks:18 js-heroku
docker run --rm -p 8080:8080 js-heroku

Result

Error: failed to launch: determine start command: process type web was not found
The docker file built is present on dockerhub at brandonkal/js-heroku

As discussed on Slack, this works: docker run -p 8080:8080 js-heroku "npm start"

heroku doesn't execute my code exactly as my terminal/node would.

ill try to explain, first as soon as the message is received a skin js object is built and sent to this functionretrieveskin), an embed(think a loading animation) is sent and that message is stored.Then canvas makes an image for me(which takes some time mind it) using the skin object(different image for each command) so once that image is build, the loading embed is deleted and the new one is sent, if the image fails to build the Error Time Out function(after 10 seconds) is called, and the loading embed becomes an error embed
https://hastebin.com/pimovaxila.js - The embed gets deleted after my image is sent, if i use node in my terminal, but it won't get deleted if i use heroku(sometimes)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.