- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将node.js api 服务器部署到Azure。我创建了一个 Azure Web 应用程序,并通过 Azure 门户创建了一个 GitHub 部署。当我推送到存储库时,Action 启动,运行构建脚本,启动 api 服务器,然后挂起而不会出现错误。关于工作流程无法完成的原因有什么想法吗?
我的app.js文件如下:
const express = require('express');
const cors = require('cors');
require('../db/mongoose');
const port = 8897
console.log("Setting port to " + port);
const userRouter = require('../routers/users');
const app = express();
app.use(cors());
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Methods");
next();
});
app.use(express.json());
app.use(userRouter);
app.listen(port, () => {
console.log('API service is up on port ' + port); //<-- this prints in Action logs
});
我的package.json文件如下:
{
"name": "api-dir",
"version": "1.0.0",
"description": "",
"main": "src/app.js",
"scripts": {
"build": "node src/app.js",
"start": "node src/app.js",
"dev": "env-cmd nodemon ./src/app.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"nodemon": "^2.0.15"
},
"dependencies": {
"@sendgrid/mail": "^7.6.1",
"bcrypt": "^5.0.1",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"env-cmd": "^10.1.0",
"express": "^4.17.2",
"jsonwebtoken": "^9.0.0",
"mongoose": "^6.7.2",
"multer": "^1.4.4",
"sharp": "^0.30.3",
"validator": "^13.7.0"
}
}
我的 GitHub 工作流程如下:
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy Node.js app to Azure Web App - kc-api-server
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: npm install and build
run: |
npm install
npm run build
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: node-app
path: .
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: node-app
- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: 'kc-api-server'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_35B0A707361B49B0865006CA24333347 }}
package: .
工作流日志(我取消工作流后)如下:
2023-05-07T18:28:05.8747790Z Requested labels: ubuntu-latest
2023-05-07T18:28:05.8748121Z Job defined at: KC/api-server/.github/workflows/main_kc-api-server.yml@refs/heads/main
2023-05-07T18:28:05.8748279Z Waiting for a runner to pick up this job...
2023-05-07T18:28:06.1295341Z Job is waiting for a hosted runner to come online.
2023-05-07T18:28:08.2484152Z Job is about to start running on the hosted runner: GitHub Actions 1 (hosted)
2023-05-07T18:28:10.4107610Z Current runner version: '2.304.0'
2023-05-07T18:28:10.4135592Z ##[group]Operating System
2023-05-07T18:28:10.4136169Z Ubuntu
2023-05-07T18:28:10.4136415Z 22.04.2
2023-05-07T18:28:10.4136812Z LTS
2023-05-07T18:28:10.4137128Z ##[endgroup]
2023-05-07T18:28:10.4137402Z ##[group]Runner Image
2023-05-07T18:28:10.4137766Z Image: ubuntu-22.04
2023-05-07T18:28:10.4138088Z Version: 20230426.1
2023-05-07T18:28:10.4138589Z Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230426.1/images/linux/Ubuntu2204-Readme.md
2023-05-07T18:28:10.4139231Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230426.1
2023-05-07T18:28:10.4139687Z ##[endgroup]
2023-05-07T18:28:10.4139987Z ##[group]Runner Image Provisioner
2023-05-07T18:28:10.4140941Z 2.0.171.1
2023-05-07T18:28:10.4141289Z ##[endgroup]
2023-05-07T18:28:10.4141930Z ##[group]GITHUB_TOKEN Permissions
2023-05-07T18:28:10.4142495Z Contents: read
2023-05-07T18:28:10.4142910Z Metadata: read
2023-05-07T18:28:10.4143447Z Packages: read
2023-05-07T18:28:10.4143870Z ##[endgroup]
2023-05-07T18:28:10.4147641Z Secret source: Actions
2023-05-07T18:28:10.4148112Z Prepare workflow directory
2023-05-07T18:28:10.4873640Z Prepare all required actions
2023-05-07T18:28:10.5054813Z Getting action download info
2023-05-07T18:28:10.7704627Z Download action repository 'actions/checkout@v3' (SHA:8e5e7e5ab8b370d6c329ec480221332ada57f0ab)
2023-05-07T18:28:11.0686996Z Download action repository 'actions/setup-node@v3' (SHA:64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c)
2023-05-07T18:28:11.2834538Z Download action repository 'actions/upload-artifact@v3' (SHA:0b7f8abb1508181956e8e162db84b466c27e18ce)
2023-05-07T18:28:11.5954871Z Complete job name: build
2023-05-07T18:28:11.6881053Z ##[group]Run actions/checkout@v3
2023-05-07T18:28:11.6881442Z with:
2023-05-07T18:28:11.6881762Z repository: KC/api-server
2023-05-07T18:28:11.6882323Z token: ***
2023-05-07T18:28:11.6882603Z ssh-strict: true
2023-05-07T18:28:11.6882908Z persist-credentials: true
2023-05-07T18:28:11.6883221Z clean: true
2023-05-07T18:28:11.6883471Z fetch-depth: 1
2023-05-07T18:28:11.6883728Z lfs: false
2023-05-07T18:28:11.6883994Z submodules: false
2023-05-07T18:28:11.6884287Z set-safe-directory: true
2023-05-07T18:28:11.6884577Z ##[endgroup]
2023-05-07T18:28:11.9099056Z Syncing repository: KC/api-server
2023-05-07T18:28:11.9101128Z ##[group]Getting Git version info
2023-05-07T18:28:11.9101704Z Working directory is '/home/runner/work/api-server/api-server'
2023-05-07T18:28:11.9102333Z [command]/usr/bin/git version
2023-05-07T18:28:11.9203415Z git version 2.40.1
2023-05-07T18:28:11.9234794Z ##[endgroup]
2023-05-07T18:28:11.9254375Z Temporarily overriding HOME='/home/runner/work/_temp/e5a13de1-3fbf-48ba-9450-b2e37dfb7e21' before making global git config changes
2023-05-07T18:28:11.9254954Z Adding repository directory to the temporary git global config as a safe directory
2023-05-07T18:28:11.9255581Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/api-server/api-server
2023-05-07T18:28:11.9298830Z Deleting the contents of '/home/runner/work/api-server/api-server'
2023-05-07T18:28:11.9304474Z ##[group]Initializing the repository
2023-05-07T18:28:11.9308057Z [command]/usr/bin/git init /home/runner/work/api-server/api-server
2023-05-07T18:28:11.9366920Z hint: Using 'master' as the name for the initial branch. This default branch name
2023-05-07T18:28:11.9368047Z hint: is subject to change. To configure the initial branch name to use in all
2023-05-07T18:28:11.9368632Z hint: of your new repositories, which will suppress this warning, call:
2023-05-07T18:28:11.9369122Z hint:
2023-05-07T18:28:11.9369641Z hint: git config --global init.defaultBranch <name>
2023-05-07T18:28:11.9369946Z hint:
2023-05-07T18:28:11.9370345Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
2023-05-07T18:28:11.9370861Z hint: 'development'. The just-created branch can be renamed via this command:
2023-05-07T18:28:11.9371175Z hint:
2023-05-07T18:28:11.9371776Z hint: git branch -m <name>
2023-05-07T18:28:11.9380553Z Initialized empty Git repository in /home/runner/work/api-server/api-server/.git/
2023-05-07T18:28:11.9393100Z [command]/usr/bin/git remote add origin https://github.com/KC/api-server
2023-05-07T18:28:11.9434092Z ##[endgroup]
2023-05-07T18:28:11.9444802Z ##[group]Disabling automatic garbage collection
2023-05-07T18:28:11.9445672Z [command]/usr/bin/git config --local gc.auto 0
2023-05-07T18:28:11.9490864Z ##[endgroup]
2023-05-07T18:28:11.9491361Z ##[group]Setting up auth
2023-05-07T18:28:11.9491939Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2023-05-07T18:28:11.9520646Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2023-05-07T18:28:11.9861926Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2023-05-07T18:28:11.9946698Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2023-05-07T18:28:12.0123068Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
2023-05-07T18:28:12.0164122Z ##[endgroup]
2023-05-07T18:28:12.0164669Z ##[group]Fetching the repository
2023-05-07T18:28:12.0170945Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +409db5910df0c85b48b01c289762072f7785dc8b:refs/remotes/origin/main
2023-05-07T18:28:12.2754223Z remote: Enumerating objects: 20, done.
2023-05-07T18:28:12.2760761Z remote: Counting objects: 5% (1/20)
2023-05-07T18:28:12.2767020Z remote: Counting objects: 10% (2/20)
2023-05-07T18:28:12.2773896Z remote: Counting objects: 15% (3/20)
2023-05-07T18:28:12.2778768Z remote: Counting objects: 20% (4/20)
2023-05-07T18:28:12.2779537Z remote: Counting objects: 25% (5/20)
2023-05-07T18:28:12.2782672Z remote: Counting objects: 30% (6/20)
2023-05-07T18:28:12.2783251Z remote: Counting objects: 35% (7/20)
2023-05-07T18:28:12.2784494Z remote: Counting objects: 40% (8/20)
2023-05-07T18:28:12.2785187Z remote: Counting objects: 45% (9/20)
2023-05-07T18:28:12.2785855Z remote: Counting objects: 50% (10/20)
2023-05-07T18:28:12.2786474Z remote: Counting objects: 55% (11/20)
2023-05-07T18:28:12.2787159Z remote: Counting objects: 60% (12/20)
2023-05-07T18:28:12.2787711Z remote: Counting objects: 65% (13/20)
2023-05-07T18:28:12.2788229Z remote: Counting objects: 70% (14/20)
2023-05-07T18:28:12.2796404Z remote: Counting objects: 75% (15/20)
2023-05-07T18:28:12.2796995Z remote: Counting objects: 80% (16/20)
2023-05-07T18:28:12.2797483Z remote: Counting objects: 85% (17/20)
2023-05-07T18:28:12.2797957Z remote: Counting objects: 90% (18/20)
2023-05-07T18:28:12.2798383Z remote: Counting objects: 95% (19/20)
2023-05-07T18:28:12.2798826Z remote: Counting objects: 100% (20/20)
2023-05-07T18:28:12.2834776Z remote: Counting objects: 100% (20/20), done.
2023-05-07T18:28:12.2835147Z remote: Compressing objects: 6% (1/15)
2023-05-07T18:28:12.2835471Z remote: Compressing objects: 13% (2/15)
2023-05-07T18:28:12.2835799Z remote: Compressing objects: 20% (3/15)
2023-05-07T18:28:12.2836126Z remote: Compressing objects: 26% (4/15)
2023-05-07T18:28:12.2836439Z remote: Compressing objects: 33% (5/15)
2023-05-07T18:28:12.2836776Z remote: Compressing objects: 40% (6/15)
2023-05-07T18:28:12.2837103Z remote: Compressing objects: 46% (7/15)
2023-05-07T18:28:12.2837411Z remote: Compressing objects: 53% (8/15)
2023-05-07T18:28:12.2837735Z remote: Compressing objects: 60% (9/15)
2023-05-07T18:28:12.2838327Z remote: Compressing objects: 66% (10/15)
2023-05-07T18:28:12.2838659Z remote: Compressing objects: 73% (11/15)
2023-05-07T18:28:12.2838974Z remote: Compressing objects: 80% (12/15)
2023-05-07T18:28:12.2839301Z remote: Compressing objects: 86% (13/15)
2023-05-07T18:28:12.2839624Z remote: Compressing objects: 93% (14/15)
2023-05-07T18:28:12.2839933Z remote: Compressing objects: 100% (15/15)
2023-05-07T18:28:12.2840276Z remote: Compressing objects: 100% (15/15), done.
2023-05-07T18:28:12.2840937Z remote: Total 20 (delta 0), reused 13 (delta 0), pack-reused 0
2023-05-07T18:28:12.2872990Z From https://github.com/KC/api-server
2023-05-07T18:28:12.2873563Z * [new ref] 409db5910df0c85b48b01c289762072f7785dc8b -> origin/main
2023-05-07T18:28:12.3041076Z ##[endgroup]
2023-05-07T18:28:12.3041610Z ##[group]Determining the checkout info
2023-05-07T18:28:12.3044729Z ##[endgroup]
2023-05-07T18:28:12.3045196Z ##[group]Checking out the ref
2023-05-07T18:28:12.3049675Z [command]/usr/bin/git checkout --progress --force -B main refs/remotes/origin/main
2023-05-07T18:28:12.3104824Z Switched to a new branch 'main'
2023-05-07T18:28:12.3110744Z branch 'main' set up to track 'origin/main'.
2023-05-07T18:28:12.3115007Z ##[endgroup]
2023-05-07T18:28:12.3157344Z [command]/usr/bin/git log -1 --format='%H'
2023-05-07T18:28:12.3186581Z '409db5910df0c85b48b01c289762072f7785dc8b'
2023-05-07T18:28:12.3533586Z ##[group]Run actions/setup-node@v3
2023-05-07T18:28:12.3533891Z with:
2023-05-07T18:28:12.3534116Z node-version: 18.x
2023-05-07T18:28:12.3534372Z always-auth: false
2023-05-07T18:28:12.3534632Z check-latest: false
2023-05-07T18:28:12.3535072Z token: ***
2023-05-07T18:28:12.3535289Z ##[endgroup]
2023-05-07T18:28:12.5684641Z Found in cache @ /opt/hostedtoolcache/node/18.16.0/x64
2023-05-07T18:28:12.5685236Z ##[group]Environment details
2023-05-07T18:28:18.2281526Z node: v18.16.0
2023-05-07T18:28:18.2282323Z npm: 9.5.1
2023-05-07T18:28:18.2282705Z yarn: 1.22.19
2023-05-07T18:28:18.2283659Z ##[endgroup]
2023-05-07T18:28:18.2454901Z ##[group]Run npm install
2023-05-07T18:28:18.2455206Z [36;1mnpm install[0m
2023-05-07T18:28:18.2455428Z [36;1mnpm run build[0m
2023-05-07T18:28:18.2513432Z shell: /usr/bin/bash -e {0}
2023-05-07T18:28:18.2513683Z ##[endgroup]
2023-05-07T18:28:28.0153756Z npm WARN deprecated <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="18756d746c7d6a5829362c362c" rel="noreferrer noopener nofollow">[email protected]</a>: Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10.
2023-05-07T18:28:29.8360526Z
2023-05-07T18:28:29.8361601Z added 323 packages, and audited 324 packages in 11s
2023-05-07T18:28:29.8362063Z
2023-05-07T18:28:29.8362472Z 25 packages are looking for funding
2023-05-07T18:28:29.8362961Z run `npm fund` for details
2023-05-07T18:28:29.8389572Z
2023-05-07T18:28:29.8399556Z 3 high severity vulnerabilities
2023-05-07T18:28:29.8400055Z
2023-05-07T18:28:29.8400606Z Some issues need review, and may require choosing
2023-05-07T18:28:29.8401076Z a different dependency.
2023-05-07T18:28:29.8401372Z
2023-05-07T18:28:29.8401798Z Run `npm audit` for details.
2023-05-07T18:28:30.2467086Z
2023-05-07T18:28:30.2468430Z > <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0e6f7e67236a677c4e3f203e203e" rel="noreferrer noopener nofollow">[email protected]</a> build
2023-05-07T18:28:30.2469058Z > node src/app.js
2023-05-07T18:28:30.2469500Z
2023-05-07T18:28:30.5864539Z Connecting to ***cluster0.hcwrc.mongodb.net/KC?authSource=test&replicaSet=atlas-xaxq3n-shard-0&readPreference=primary&ssl=true
2023-05-07T18:28:30.6003857Z Setting port to 8897
2023-05-07T18:28:30.7253249Z (node:1831) [MONGOOSE] DeprecationWarning: Mongoose: the `strictQuery` option will be switched back to `false` by default in Mongoose 7. Use `mongoose.set('strictQuery', false);` if you want to prepare for this change. Or use `mongoose.set('strictQuery', true);` to suppress this warning.
2023-05-07T18:28:30.7254519Z **API service is up on port 8897**
2023-05-07T18:28:30.7255759Z (Use `node --trace-deprecation ...` to show where the warning was created)
2023-05-07T18:50:41.1827979Z ##[error]The operation was canceled.
2023-05-07T18:50:41.1883321Z Post job cleanup.
2023-05-07T18:50:41.3642123Z [command]/usr/bin/git version
2023-05-07T18:50:41.3642407Z git version 2.40.1
2023-05-07T18:50:41.3645275Z Temporarily overriding HOME='/home/runner/work/_temp/d2e11fe2-4452-4f9f-8d29-1c86bb3938ff' before making global git config changes
2023-05-07T18:50:41.3645854Z Adding repository directory to the temporary git global config as a safe directory
2023-05-07T18:50:41.3646677Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/api-server/api-server
2023-05-07T18:50:41.3647731Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2023-05-07T18:50:41.3649130Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2023-05-07T18:50:41.3650436Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2023-05-07T18:50:41.3651017Z http.https://github.com/.extraheader
2023-05-07T18:50:41.3652180Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2023-05-07T18:50:41.3653835Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2023-05-07T18:50:41.3784140Z Cleaning up orphan processes
2023-05-07T18:50:41.4016340Z Terminate orphan process: pid (1819) (npm run build)
2023-05-07T18:50:41.4068420Z Terminate orphan process: pid (1830) (sh)
2023-05-07T18:50:41.4088311Z Terminate orphan process: pid (1831) (node)
最佳答案
问题已经解决了。我在 package.json 中有一个“构建”脚本,它与“启动”脚本执行相同的操作,即
"build": "node src/app.js"
GitHub 工作流程将运行构建脚本,从而启动服务器,当然,服务器不会终止。
从 package.json 中删除“构建”脚本可以让工作流程完成。
关于node.js - Azure Web 应用程序的 GitHub 部署不会停止 Node.js API 服务器的 'build' 作业(无错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76195851/
我用运行 Node node --debug app OR node --debug-brk app 它有反应 debugger listening on port 5858 Express serv
这个问题在这里已经有了答案: What is the difference between (int *i) and (int* i) in context of both C and C++? [
我有一个应用程序,它通过消息队列将数据库写入命令分派(dispatch)给工作人员(数量非常大),因此无法保证它们的接收顺序。 我有两个 Node ,例如“Account”和“Media”。在此假设的
有没有办法在调用 ts-node 时将选项传递给 Node ?我正在尝试在 Node 中使用一个实验性功能,如果它能与 ts-node 一起使用,那就太好了。 这就是我目前正在做的事情: ts-nod
我有一个容器化的Node应用程序,它在DigitalOcean服务器上运行。当我更新服务器上的应用程序时,该应用程序必须关闭一小段时间。为了能够更新应用程序并避免停机,我目前正在阅读零停机时间部署/蓝
我正在编写一个 Node.js 应用程序。我正在使用 request 和 Cheerio 加载一组 URL 并获取该网站的大量信息,现在假设我想要获取的只是标题: var urls = {"url_1
如果不弹出以下错误,我无法安装任何 Node.js 模块。错误代码引用package.json文件。如果知道为什么会发生这种情况,我们将不胜感激。 最佳答案 这些不是错误,它们只是警告。一切都应该如此
如果我运行(从我的项目目录中): supervisor javascripts/index.js 我得到:/usr/bin/env: Node :没有这样的文件或目录 如果我运行: node java
我已遵循使用 Node-Inspector 的所有步骤 但是当我打开应用程序时,我在控制台上看不到任何脚本或日志。 我的应用程序在端口 4000 上运行。我认为唯一可能发生冲突的是端口 8080 上的
我在android中使用rxjava2,有时会遇到这样的问题: Observable.fromArray( // maybe a list about photo url in SD
我目前正在使用 Node 光纤来编写同步服务器端代码。我主要通过 try-catch block 进行错误处理,但外部库或其他小部分异步代码中总是有可能发生错误。我正在考虑使用新的域功能来尝试将这些错
看起来node-debug是node-inspector周围的一个shell?分别什么时候应该使用? 最佳答案 如果您安装node-debug,您只能访问node-debug命令。 如果您安装node
我目前正在代理后面工作,该代理不允许我执行此命令的 HTTP GET 请求阶段: Node node-sass/scripts/build.js 请求阶段: gyp http GET https://
听说node js可以用在服务端。我以前用过jsp。 jsp页面内部的java代码对客户端是不可见的。如果 Node js 只是 javascript,那么它如何对客户端不可见? 最佳答案 首先,No
我正在为 Node native 插件从 node-waf 构建迁移到 node-gyp 构建系统。 node-gyp 说它支持多个目标版本,但我在使用 node-gyp 时找不到如何指定目标 Nod
给定一个 $node ,我正在尝试在以下两种输出该 $node 的方式之间做出决定。 要么 $output = theme('node', $node); 或 node_build_content($
如果package.json中的窗口A打开一个新窗口B,node-main如何访问它?这是我的代码: package.json { "main": "index.html",
我试图在我的 xml 中的特定节点 ( ) 之前插入一个注释节点。这是它的方法: function test(xmlResponse) { var parser = new DOMParse
我正在尝试做npm install wrtc使用 Node 版本 16.14.0 但这还没有完成。它在给npm error code 1所以我试图将 Node 版本更改为以前的 lts 14.19.0
当我在 Visual Studio 中运行 Node.js 应用程序时,我收到以下消息:DeprecationWarning: 'node --debug' 和 'node --debug-brk'
我是一名优秀的程序员,十分优秀!