我正在尝试使用 node.js 和 vue.js 创建一个网站。因此,要运行代码,我首先在终端中将目录更改为项目目录并使用npm run serve命令。但我仍然收到错误。我什至使用命令重新下载了npm库npm install。
错误是,
vue-cli-service serve
INFO Starting development server...
10% building 5/5 modules 0 activeevents.js:174
^
throw er; // Unhandled 'error' event
Error: getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
Emitted 'error' event at:
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1448:12)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:17)
任何帮助将不胜感激。
我目前正在开发一个使用 ADFS 身份验证的 Web 应用程序。
我有以下运行时错误:
“找不到模块@auth0/angular-jwt”。
我正在使用Angular 5.2.10。我尝试重新安装我的依赖项,但仍然有错误:
我有以下错误index.d.ts:
找不到名称“Provider”和“ModuleWithProviders”
并在jwt.interceptor.d.ts:
找不到模块“@angular/common/http”和“rxjs/internal/Observable”
并在jwtoptions.token.d.ts:
找不到模块“@angular/core”
我没有修改任何这些文件。
这是角度版本问题吗?我使用了这些库的错误版本吗?
感谢您的帮助!
当我运行我的函数时,它给了我错误:Resolution method is overspecified. Specify a callback *or* return a Promise; not both.任何人都可以检查我的代码,并帮助解决这个问题吗?我在这里放置了完整的代码
it('Get Organizations', async function (done) {
let user_permission = await commonService.getuserPermission(logged_in_user_id,'organizations','findAll');
let api_status = 404;
if(user_permission) {
api_status = 200;
}
let current_token = currentResponse['token'];
old_unique_token = current_token;
chai.request(app)
.post('entities')
.set('Content-Type', 'application/json')
.set('vrc-access-token', current_token)
.send({ "key": "organizations", "operation": "findAll" })
.end(function (err, res) {
currentResponse = res.body;
expect(err).to.be.null;
expect(res).to.have.status(api_status);
done();
});
});
Run Code Online (Sandbox Code Playgroud) 当我尝试使用npm install chromedriver --chromedriver-force-downloadNode js 安装 Chrome 驱动程序时,出现以下错误:chromedriver installation failed error eacces permission denied mkdir。
我已经申请了完全许可777,但仍然收到此错误,有人可以帮助我为什么会收到此错误吗?
我使用了这些命令:
1) npm i chromedriver
2) Force Download : npm install chromedriver --chromedriver-force-download
Run Code Online (Sandbox Code Playgroud) mocha.js node.js selenium-chromedriver node-modules selenium-webdriver
我有一个正在导出的模块。我需要一个函数来调用另一个函数。这是我正在尝试做的事情的简化版本。
module.exports = {
isEven: (number) => {
return (number%2 == 0)
},
isTenEven: () => {
return isEven(10)
}
}
Run Code Online (Sandbox Code Playgroud)
上面的代码在被调用isEven is not defined时会抛出异常moduleName.isTenEven()。
失败的原因是有道理的。但你会如何重写它呢?(同时保持单例模式)
我正在学习 GraphQL 所以遇到了一个奇怪的问题
我在一个文件 Schema.js 上有以下代码:
const graphQL = require('graphql');
const lodash = require('lodash')
const { GraphQLObjectType, GraphQLString, GraphQLInt, GraphQLID, GraphQLSchema, GraphQLList } = graphQL;
const StatusType = new GraphQLObjectType({
name: 'Status',
fields: () => ({
id: { type: GraphQLInt },
statusName: { type: GraphQLString },
user: {
type: new GraphQLList(UserType),
resolve(parentValue, args){
}
}
})
});
const UserType = new GraphQLObjectType({
name: 'User',
fields: () => ({
id: { type: GraphQLString },
username: { type: GraphQLString },
mail: { …Run Code Online (Sandbox Code Playgroud) 我正在运行zip -r nm.zip node_modules并收到此错误:
zip warning: missing end signature--probably not a zip file (did you
zip warning: remember to use binary mode when you transferred it?)
zip warning: (if you are trying to read a damaged archive try -F)
Run Code Online (Sandbox Code Playgroud)
node_modules 是一个目录。我正在大厅内的 docker 容器内执行此操作。
我在我的网络应用程序中收到此错误
ERROR in node_modules/zone.js/dist/zone.js.d.ts:600:21 - error TS2503: Cannot find namespace 'NodeJS'.
600 declare var global: NodeJS.Global;
Run Code Online (Sandbox Code Playgroud)
正如您在下面看到的,我已经添加了该types": ["node"]属性,但它仍然无法正常工作
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"types": ["node"],
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "es6",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
Run Code Online (Sandbox Code Playgroud)
我实在不知道怎么解决。应用程序第一次启动获取Cannot GET /,然后在保存任何文件后,它可以工作,但仍然出现 NodeJS 错误。谢谢
我找不到任何关于此的简单说明。我已经安装了 node.js 和 npm,然后在其自己的文件夹 中创建了一个项目,D:\node_stuff然后通过cmd(Windows 10) cd 到那里并运行npm install express, npm init。我正在尝试使用gififynpm ,并通过而不是brew(ffmpeg、imagemagick、giflossy)安装其依赖项。
gifify -h->“gifify”不被识别为内部或外部命令、可操作程序或批处理文件。node gifify -h-> 错误:找不到模块 'D:\node_stuff\gifify'cd node_modules-> node gifify -h-> 什么也没发生我究竟做错了什么?我什至在哪里看 - 所有带有简单搜索的教程仅显示如何安装软件包或构建项目 - 我不需要构建任何东西,只需使用这个模块。
通过安装任何软件包后我收到错误npm。每次我通过 提交申请时ng serve,都会出现错误,提示Error: Type [packageName] does not have '\xc9\xb5mod' property.我应该做什么?
我想如果我删除我的node_modules文件夹并通过命令重新创建它npm install,它就会得到解决。
任何人都可以建议,如果我删除node_modules文件夹并重新创建文件夹后,我会以删除之前的方式恢复所有已安装的软件包吗?
node-modules ×10
node.js ×8
angular ×3
npm ×3
javascript ×2
mocha.js ×2
typescript ×2
auth0 ×1
chai ×1
concourse ×1
docker ×1
graphql ×1
zip ×1