Package/registry 在本地获取现有 MEAN 应用 运行 时出现问题
Package/registry issues while getting an existing MEAN app running locally
我目前正在尝试启动现有的 MEAN 应用程序并 运行ning。但是,我完全无法在 mac.
上设置本地环境
我没有创建这个网络应用程序,所以这让事情变得更加混乱。
摘要
我想启动现有的 Web 应用程序并 运行ning。我安装了 node.js 并确保 MongoDB 是 运行ning。我导航到我的应用程序的 /server 目录和 运行 npm install
。然后,当我尝试 运行 npm start
时,我收到一个错误消息,指出包裹有问题。然后我 运行 npm bugs <package-name>
它说 <package-name>
不在 npm 注册表中。
详情
npm start
给我这个 npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@3.6.0
3 info using node@v5.7.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle groep4@0.0.1~prestart: groep4@0.0.1
6 silly lifecycle groep4@0.0.1~prestart: no script for restart, continuing
7 info lifecycle groep4@0.0.1~start: groep4@0.0.1
8 verbose lifecycle groep4@0.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle groep4@0.0.1~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/Sander/Documents/game-out/server/node_modules/.bin:/Users/Sander/.rvm/gems/ruby-1.9.3-p392/bin:/Users/Sander/.rvm/gems/ruby-1.9.3-p392@global/bin:/Users/Sander/.rvm/rubies/ruby-1.9.3-p392/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/Sander/.rvm/bin
10 verbose lifecycle groep4@0.0.1~start: CWD: /Users/Sander/Documents/game-out/server
11 silly lifecycle groep4@0.0.1~start: Args: [ '-c', 'node bin/www.js' ]
12 silly lifecycle groep4@0.0.1~start: Returned: code: 1 signal: null
13 info lifecycle groep4@0.0.1~start: Failed to exec start script
14 verbose stack Error: groep4@0.0.1 start: `node bin/www.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:827:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid groep4@0.0.1
16 verbose cwd /Users/Sander/Documents/game-out/server
17 error Darwin 15.3.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 error node v5.7.0
20 error npm v3.6.0
21 error code ELIFECYCLE
22 error groep4@0.0.1 start: `node bin/www.js`
22 error Exit status 1
23 error Failed at the groep4@0.0.1 start script 'node bin/www.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the groep4 package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node bin/www.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs groep4
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls groep4
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
npm bugs groep4
给我以下 npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'bugs', 'groep4' ]
2 info using npm@3.6.0
3 info using node@v5.7.0
4 silly fetchPackageMetaData groep4
5 silly fetchNamedPackageData groep4
6 silly mapToRegistry name groep4
7 silly mapToRegistry using default registry
8 silly mapToRegistry registry https://registry.npmjs.org/
9 silly mapToRegistry uri https://registry.npmjs.org/groep4
10 verbose request uri https://registry.npmjs.org/groep4
11 verbose request no auth needed
12 info attempt registry request try #1 at 10:01:10 PM
13 verbose request using bearer token for auth
14 verbose request id 4a6ce97af77a8f09
15 http request GET https://registry.npmjs.org/groep4
16 http 404 https://registry.npmjs.org/groep4
17 verbose headers { 'content-type': 'application/json',
17 verbose headers 'cache-control': 'max-age=0',
17 verbose headers 'content-length': '2',
17 verbose headers 'accept-ranges': 'bytes',
17 verbose headers date: 'Thu, 25 Feb 2016 21:01:11 GMT',
17 verbose headers via: '1.1 varnish',
17 verbose headers connection: 'keep-alive',
17 verbose headers 'x-served-by': 'cache-ams4146-AMS',
17 verbose headers 'x-cache': 'MISS',
17 verbose headers 'x-cache-hits': '0',
17 verbose headers 'x-timer': 'S1456434071.123107,VS0,VE697' }
18 silly get cb [ 404,
18 silly get { 'content-type': 'application/json',
18 silly get 'cache-control': 'max-age=0',
18 silly get 'content-length': '2',
18 silly get 'accept-ranges': 'bytes',
18 silly get date: 'Thu, 25 Feb 2016 21:01:11 GMT',
18 silly get via: '1.1 varnish',
18 silly get connection: 'keep-alive',
18 silly get 'x-served-by': 'cache-ams4146-AMS',
18 silly get 'x-cache': 'MISS',
18 silly get 'x-cache-hits': '0',
18 silly get 'x-timer': 'S1456434071.123107,VS0,VE697' } ]
19 silly fetchPackageMetaData Error: Registry returned 404 for GET on https://registry.npmjs.org/groep4
19 silly fetchPackageMetaData at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:264:12)
19 silly fetchPackageMetaData at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:242:14)
19 silly fetchPackageMetaData at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14)
19 silly fetchPackageMetaData at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:198:22)
19 silly fetchPackageMetaData at emitTwo (events.js:100:13)
19 silly fetchPackageMetaData at Request.emit (events.js:185:7)
19 silly fetchPackageMetaData at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1035:10)
19 silly fetchPackageMetaData at emitOne (events.js:95:20)
19 silly fetchPackageMetaData at Request.emit (events.js:182:7)
19 silly fetchPackageMetaData at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:962:12)
19 silly fetchPackageMetaData error for groep4 { [Error: Registry returned 404 for GET on https://registry.npmjs.org/groep4] pkgid: 'groep4', statusCode: 404, code: 'E404' }
20 verbose stack Error: Registry returned 404 for GET on https://registry.npmjs.org/groep4
20 verbose stack at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:264:12)
20 verbose stack at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:242:14)
20 verbose stack at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14)
20 verbose stack at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:198:22)
20 verbose stack at emitTwo (events.js:100:13)
20 verbose stack at Request.emit (events.js:185:7)
20 verbose stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1035:10)
20 verbose stack at emitOne (events.js:95:20)
20 verbose stack at Request.emit (events.js:182:7)
20 verbose stack at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:962:12)
21 verbose statusCode 404
22 verbose pkgid groep4
23 verbose cwd /Users/Sander/Documents/game-out/server
24 error Darwin 15.3.0
25 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "bugs" "groep4"
26 error node v5.7.0
27 error npm v3.6.0
28 error code E404
29 error 404 Registry returned 404 for GET on https://registry.npmjs.org/groep4
30 error 404
31 error 404 'groep4' is not in the npm registry.
32 error 404 You should bug the author to publish it (or use the name yourself!)
33 error 404 Note that you can also install from a
34 error 404 tarball, folder, http url, or git url.
35 verbose exit [ 1, true ]
因此,我阅读了大量有关 npm 和包的资料。我尝试从包中创建一个 tarball,json 并安装它。但没有任何结果。当 运行ning npm start
.
时,我仍然遇到同样的错误
我还与开发此应用程序的人员核实过 https://registry.npmjs.org/groep4 从未存在过。所以问题不仅仅是注册表被清空了,这是我最初的想法。
我设法使用 sudo npm install -g mean-cli
和 mean init yourNewApp
启动并 运行ning 了一个新的 MEAN 堆栈应用程序。然后我只是按照屏幕上的说明进行设置。它运作良好。所以我假设问题不在于 node.js 或 MongoDB.
我做了整件事 available via GitHub,也许这会提供一些背景信息。
我提供了所有我能想到的细节,但请不要犹豫,询问您需要的任何东西。
经过大量故障排除后,我找到了答案。我将 post 放在这里以供将来参考。
这个错误有点误导,因为这个包与任何东西都没有关系。问题实际上出在配置文件上。第一步是正确设置它。
此外,服务器应该以 node server.js
而非 npm start
启动。
这对我来说已经解决了。我现在在我的本地环境中启动了应用程序和 运行。
我目前正在尝试启动现有的 MEAN 应用程序并 运行ning。但是,我完全无法在 mac.
上设置本地环境我没有创建这个网络应用程序,所以这让事情变得更加混乱。
摘要
我想启动现有的 Web 应用程序并 运行ning。我安装了 node.js 并确保 MongoDB 是 运行ning。我导航到我的应用程序的 /server 目录和 运行 npm install
。然后,当我尝试 运行 npm start
时,我收到一个错误消息,指出包裹有问题。然后我 运行 npm bugs <package-name>
它说 <package-name>
不在 npm 注册表中。
详情
npm start
给我这个 npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@3.6.0
3 info using node@v5.7.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle groep4@0.0.1~prestart: groep4@0.0.1
6 silly lifecycle groep4@0.0.1~prestart: no script for restart, continuing
7 info lifecycle groep4@0.0.1~start: groep4@0.0.1
8 verbose lifecycle groep4@0.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle groep4@0.0.1~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/Sander/Documents/game-out/server/node_modules/.bin:/Users/Sander/.rvm/gems/ruby-1.9.3-p392/bin:/Users/Sander/.rvm/gems/ruby-1.9.3-p392@global/bin:/Users/Sander/.rvm/rubies/ruby-1.9.3-p392/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/Sander/.rvm/bin
10 verbose lifecycle groep4@0.0.1~start: CWD: /Users/Sander/Documents/game-out/server
11 silly lifecycle groep4@0.0.1~start: Args: [ '-c', 'node bin/www.js' ]
12 silly lifecycle groep4@0.0.1~start: Returned: code: 1 signal: null
13 info lifecycle groep4@0.0.1~start: Failed to exec start script
14 verbose stack Error: groep4@0.0.1 start: `node bin/www.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:827:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid groep4@0.0.1
16 verbose cwd /Users/Sander/Documents/game-out/server
17 error Darwin 15.3.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 error node v5.7.0
20 error npm v3.6.0
21 error code ELIFECYCLE
22 error groep4@0.0.1 start: `node bin/www.js`
22 error Exit status 1
23 error Failed at the groep4@0.0.1 start script 'node bin/www.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the groep4 package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node bin/www.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs groep4
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls groep4
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
npm bugs groep4
给我以下 npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'bugs', 'groep4' ]
2 info using npm@3.6.0
3 info using node@v5.7.0
4 silly fetchPackageMetaData groep4
5 silly fetchNamedPackageData groep4
6 silly mapToRegistry name groep4
7 silly mapToRegistry using default registry
8 silly mapToRegistry registry https://registry.npmjs.org/
9 silly mapToRegistry uri https://registry.npmjs.org/groep4
10 verbose request uri https://registry.npmjs.org/groep4
11 verbose request no auth needed
12 info attempt registry request try #1 at 10:01:10 PM
13 verbose request using bearer token for auth
14 verbose request id 4a6ce97af77a8f09
15 http request GET https://registry.npmjs.org/groep4
16 http 404 https://registry.npmjs.org/groep4
17 verbose headers { 'content-type': 'application/json',
17 verbose headers 'cache-control': 'max-age=0',
17 verbose headers 'content-length': '2',
17 verbose headers 'accept-ranges': 'bytes',
17 verbose headers date: 'Thu, 25 Feb 2016 21:01:11 GMT',
17 verbose headers via: '1.1 varnish',
17 verbose headers connection: 'keep-alive',
17 verbose headers 'x-served-by': 'cache-ams4146-AMS',
17 verbose headers 'x-cache': 'MISS',
17 verbose headers 'x-cache-hits': '0',
17 verbose headers 'x-timer': 'S1456434071.123107,VS0,VE697' }
18 silly get cb [ 404,
18 silly get { 'content-type': 'application/json',
18 silly get 'cache-control': 'max-age=0',
18 silly get 'content-length': '2',
18 silly get 'accept-ranges': 'bytes',
18 silly get date: 'Thu, 25 Feb 2016 21:01:11 GMT',
18 silly get via: '1.1 varnish',
18 silly get connection: 'keep-alive',
18 silly get 'x-served-by': 'cache-ams4146-AMS',
18 silly get 'x-cache': 'MISS',
18 silly get 'x-cache-hits': '0',
18 silly get 'x-timer': 'S1456434071.123107,VS0,VE697' } ]
19 silly fetchPackageMetaData Error: Registry returned 404 for GET on https://registry.npmjs.org/groep4
19 silly fetchPackageMetaData at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:264:12)
19 silly fetchPackageMetaData at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:242:14)
19 silly fetchPackageMetaData at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14)
19 silly fetchPackageMetaData at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:198:22)
19 silly fetchPackageMetaData at emitTwo (events.js:100:13)
19 silly fetchPackageMetaData at Request.emit (events.js:185:7)
19 silly fetchPackageMetaData at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1035:10)
19 silly fetchPackageMetaData at emitOne (events.js:95:20)
19 silly fetchPackageMetaData at Request.emit (events.js:182:7)
19 silly fetchPackageMetaData at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:962:12)
19 silly fetchPackageMetaData error for groep4 { [Error: Registry returned 404 for GET on https://registry.npmjs.org/groep4] pkgid: 'groep4', statusCode: 404, code: 'E404' }
20 verbose stack Error: Registry returned 404 for GET on https://registry.npmjs.org/groep4
20 verbose stack at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:264:12)
20 verbose stack at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:242:14)
20 verbose stack at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14)
20 verbose stack at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:198:22)
20 verbose stack at emitTwo (events.js:100:13)
20 verbose stack at Request.emit (events.js:185:7)
20 verbose stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1035:10)
20 verbose stack at emitOne (events.js:95:20)
20 verbose stack at Request.emit (events.js:182:7)
20 verbose stack at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:962:12)
21 verbose statusCode 404
22 verbose pkgid groep4
23 verbose cwd /Users/Sander/Documents/game-out/server
24 error Darwin 15.3.0
25 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "bugs" "groep4"
26 error node v5.7.0
27 error npm v3.6.0
28 error code E404
29 error 404 Registry returned 404 for GET on https://registry.npmjs.org/groep4
30 error 404
31 error 404 'groep4' is not in the npm registry.
32 error 404 You should bug the author to publish it (or use the name yourself!)
33 error 404 Note that you can also install from a
34 error 404 tarball, folder, http url, or git url.
35 verbose exit [ 1, true ]
因此,我阅读了大量有关 npm 和包的资料。我尝试从包中创建一个 tarball,json 并安装它。但没有任何结果。当 运行ning npm start
.
我还与开发此应用程序的人员核实过 https://registry.npmjs.org/groep4 从未存在过。所以问题不仅仅是注册表被清空了,这是我最初的想法。
我设法使用 sudo npm install -g mean-cli
和 mean init yourNewApp
启动并 运行ning 了一个新的 MEAN 堆栈应用程序。然后我只是按照屏幕上的说明进行设置。它运作良好。所以我假设问题不在于 node.js 或 MongoDB.
我做了整件事 available via GitHub,也许这会提供一些背景信息。
我提供了所有我能想到的细节,但请不要犹豫,询问您需要的任何东西。
经过大量故障排除后,我找到了答案。我将 post 放在这里以供将来参考。
这个错误有点误导,因为这个包与任何东西都没有关系。问题实际上出在配置文件上。第一步是正确设置它。
此外,服务器应该以 node server.js
而非 npm start
启动。
这对我来说已经解决了。我现在在我的本地环境中启动了应用程序和 运行。