gpt4 book ai didi

node.js - 错误!不允许用户访问包@gulp-sourcemaps/map-sources : @gulp-sourcemaps/map-sources

转载 作者:搜寻专家 更新时间:2023-11-01 00:16:51 27 4
gpt4 key购买 nike

在过去的几个月里,我现在每天都在使用 nodejs 和“Jenkins”。无需对我的 package.json 进行任何更改。在“jenkins”构建我的项目时出现以下错误 -

gifsicle@3.0.4 postinstall /var/lib/jenkins/workspace/musichords/public/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle
> node lib/install.js

module.js:338
throw err;
^
Error: Cannot find module '@gulp-sourcemaps/map-sources'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/var/lib/jenkins/workspace/musichords/public/node_modules/vinyl-fs/node_modules/gulp-sourcemaps/index.js:6:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)


npm WARN optional dep failed, continuing imagemin-optipng@4.3.0
npm WARN optional dep failed, continuing imagemin-jpegtran@4.3.2
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_0.12.9/bin/node" "/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_0.12.9/bin/npm" "install"
npm ERR! node v0.12.9
npm ERR! npm v2.14.9
npm ERR! code E403

npm ERR! user developers is not allowed to access package @gulp-sourcemaps/map-sources : @gulp-sourcemaps/map-sources
npm ERR!

我运行了 npm update,删除并重新安装了 npm,安装了“gulp-sourcemaps”和更多的依赖项。似乎没有任何效果。

我在“package.json”的依赖项-

"dependencies": {
"acorn": "^5.0.0",
"async": "^1.5.1",
"aws-sdk": "^2.2.26",
"blueimp-md5": "^2.1.0",
"bytes": "^2.2.0",
"cheerio": "^0.20.0",
"collections": "^3.0.0",
"convert-source-map": "^1.5.0",
"cors": "^2.7.1",
"csv": "^0.4.6",
"css": "^2.2.1",
"extend": "^3.0.0",
"detect-newline": "^2.1.0",
"debug-fabulous": "^0.0.4",
"geoip-lite-youtab": "*",
"glob": "^7.0.0",
"grunt-contrib-imagemin": "^1.0.1",
"gulp": "^3.9.1",
"gulp-sourcemap": "^1.0.1",
"imagemin": "^5.2.0",
"imagemin-gifsicle": "^5.0.0",
"imagemin-jpegtran":"^5.0.0",
"imagemin-optipng":"^5.0.0",
"jade": "^1.11.0",
"jstransformer-clean-css": "^1.1.0",
"jstransformer-uglify-js": "^1.1.1",
"jstransformer-verbatim": "1.0.0",
"lru-cache": "^4.0.0",
"moment": "^2.11.0",
"needle": "^1.0.0",
"neo4j": "2.0.0-RC2",
"newrelic": "^1.24.1",
"node-genres": "*",
"optipng-bin": "^3.1.2",
"paypal-rest-sdk": "^1.7.1",
"source-map": "^0.5.6",
"string": "^3.3.1",
"text-encoding": "^0.6.1",
"underscore": "^1.8.3",
"underscore.string": "^3.2.2",
"winston": "^2.1.1",
"ytf-node-framework": "*",
"ytf-server": "*",
"ytf-server-commons": "*"
},
"devDependencies": {
"chai": "^3.4.1",
"grunt": "^0.4.5",
"grunt-contrib-clean": "~1.0.0",
"grunt-contrib-copy": "~0.8.2",
"grunt-contrib-watch": "^0.6.1",
"grunt-shell": "^1.1.2",
"mocha": "^2.3.4",
"spec-xunit-file": "^0.0.1-3",
"superagent-no-cache": "^0.1.0",
"supertest": "^1.1.0",
"tizi": "*"
}

感谢我能找到的任何帮助。

最佳答案

我能够通过将该范围的注册表显式设置为 npmjs 注册表来解决此问题。

npm 配置集@gulp-sourcemaps:registry https://registry.npmjs.org/

https://docs.npmjs.com/misc/scope

我相信更新您的 .npmrc 文件以包含它也可以:

@gulp-sourcemaps:registry=https://registry.npmjs.org

关于node.js - 错误!不允许用户访问包@gulp-sourcemaps/map-sources : @gulp-sourcemaps/map-sources,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43119175/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com