Repository navigation
Open
Description
k logs builder-zx7hr-buildrun-mb8g2-vk45c-pod -c step-create
===> DETECTING
3 of 4 buildpacks participating
openfunction.nodejs.npm 0.6.0
openfunction.nodejs.functions-framework 0.6.0
google.utils.label 0.0.1
===> ANALYZING
Previous image with name "uestczshen/sample-node-esm-func:v1" not found
===> RESTORING
===> BUILDING
=== Node.js - NPM (openfunction.nodejs.npm@0.6.0) ===
Generating package-lock.json.
WARNING: *** Improve build performance by generating and committing package-lock.json.
--------------------------------------------------------------------------------
Running "npm install --package-lock-only --quiet"
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/cloudevents (over 300000ms)
npm ERR! A complete log of this run can be found in:
npm ERR! /home/cnb/.npm/_logs/2023-09-13T10_37_47_535Z-debug.log
Done "npm install --package-lock-only --quiet" (52m7.6884s)
Failure: (ID: b0ba1f57) npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/cloudevents (over 300000ms)
npm ERR! A complete log of this run can be found in:
npm ERR! /home/cnb/.npm/_logs/2023-09-13T10_37_47_535Z-debug.log
ERROR: failed to build: exit status 1
maybe I should set the npm source https://registry.npm.taobao.org, but how to?
function.yaml
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: node-sample
spec:
version: "v1.0.0"
image: "uestczshen/sample-node-esm-func:v1"
imageCredentials:
name: push-secret
build:
builder: "openfunction/builder-node:latest"
env:
FUNC_NAME: "helloESM"
FUNC_TYPE: "http"
srcRepo:
url: "https://github.com/OpenFunction/samples.git"
sourceSubPath: "functions/knative/hello-world-node/esm"
revision: "main"
serving:
template:
containers:
- name: function
imagePullPolicy: IfNotPresent
triggers:
http:
port: 8080
Metadata
Metadata
Assignees
Labels
No labels
Activity
benjaminhuo commentedon Sep 14, 2023
@webup Would you give some lights on this? :)
uestczz commentedon Sep 14, 2023
@benjaminhuo I add .npmrc to the folder
then it runs okay. but I encounter another error, dapr sidecar start error when I invoke the function by external address. my binding is the same with my go function, and my go function runs okay.
my function.yaml is:
my js code:
and at last my package.json is:
I can invode the binding through endpoints of node-bind-http-default-dapr service:
can you give some suggestions?
uestczz commentedon Sep 14, 2023
I can invoke the node-bind-http-default-dapr service:
uestczz commentedon Sep 15, 2023
I think there's sth wrong with my openfunction edittion v0.6.0. I find samples:v0.6.0 has no node-output-binding sample. so it may be the reason. but I use helm, and the latest version in helm is v0.6.0. should I upgrade by another way? @benjaminhuo
uestczz commentedon Sep 15, 2023
okay, I found the chart repo. So I will follow the readme doc first. So must I upgrade step by step? 0.6 -> .07, 0.7->0.8, 0.8->1.0