首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm启动但看到错误

npm启动但看到错误
EN

Stack Overflow用户
提问于 2016-06-28 02:30:19
回答 1查看 2.2K关注 0票数 0

我启动npm,但看到错误,我不知道修复。请帮帮我

代码语言:javascript
复制
"D:\PhpStorm 2016.1.2\bin\runnerw.exe" D:\nodejs\node.exe D:\nodejs\node_modules\npm\bin\npm-cli.js run-script start

> pickuphub@0.3.0 start E:\phong.pham\Developer\phpDev\pickuphub.net
> npm run start:tunnel


> pickuphub@0.3.0 start:tunnel E:\phong.pham\Developer\phpDev\pickuphub.net
> cross-env NODE_ENV=development node internals/server

CarteBlanche started at /carte-blanche
Server started ✓


Access URLs:
-----------------------------------
Localhost: http://localhost:3000
      LAN: http://192.168.0.107:3000
-----------------------------------
Press CTRL-C to stop

错误:

绝对的例外..。E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:594:21 at Array.forEach (原生) at E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:593:22 at Array.forEach (原生) at Compilation.reportDependencyWarnings (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:592:9)在编译时。(E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:483:8) at Array.forEach (原生)在Compilation.seal (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:482:15) at Compiler。(E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compiler.js:431:15)在E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\node_modules\tapable\lib\Tapable.js:152:11的秘密例外..。未定义

错误:

代码语言:javascript
复制
 npm ERR! Windows\_NT 10.0.10586     npm ERR! argv "D:\nodejs\node.exe" "C:\Users\phamv\AppData\Roaming\npm\node\_modules\npm\bin\npm-cli.js" "run" "start:tunnel"     npm ERR! node v4.4.5     npm ERR! npm  v3.9.6     npm ERR! code ELIFECYCLE     npm ERR! pickuphub@0.3.0 start:tunnel: `cross-env NODE_ENV=development node internals/server`     npm ERR! Exit status 1     npm ERR!      npm ERR! Failed at the pickuphub@0.3.0 start:tunnel script 'cross-env NODE\_ENV=development node internals/server'.     npm ERR! Make sure you have the latest version of node.js and npm installed.     npm ERR! If you do, this is most likely a problem with the pickuphub **package,**         npm ERR! not with npm itself.         npm ERR! Tell the author that this fails on your system:         npm ERR!     cross-env NODE\_ENV=development node internals/server         npm ERR! You can get information on how to open an issue for this project with:         npm ERR!     npm bugs pickuphub         npm ERR! Or if that isn't available, you can get their info via:         npm ERR!     npm owner ls pickuphub         npm ERR! There is likely additional logging output above.
代码语言:javascript
复制
    npm ERR! Please include the following file with any support request:
    npm ERR!     E:\phong.pham\Developer\phpDev\pickuphub.net\npm-debug.log

    npm ERR! Windows_NT 10.0.10586
    npm ERR! argv "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run-script" "start"
    npm ERR! node v4.4.5
    npm ERR! npm  v2.15.5
    npm ERR! code ELIFECYCLE
    npm ERR! pickuphub@0.3.0 start: `npm run start:tunnel`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the pickuphub@0.3.0 start script 'npm run start:tunnel'.
    npm ERR! This is most likely a problem with the pickuphub package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     npm run start:tunnel
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs pickuphub
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR! 
    npm ERR!     npm owner ls pickuphub
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR!     E:\phong.pham\Developer\phpDev\pickuphub.net\npm-debug.log

    Process finished with exit code 1

i begin learn reactjs and using nodejs . please help me
package.json
{
  "name": "pickuphub",
  "version": "0.3.0",
  "private": true,
  "dllPlugin": {
    "path": "node_modules/pickuphub-dlls",
    "exclude": [
      "sanitize.css"
    ],
    "include": [
      "babel-polyfill",
      "core-js",
      "eventsource-polyfill",
      "lodash"
    ]
  },
  "dependencies": {
    "angle-input": "git+https://github.com/hosmelq/angle-input.git",
    "babel-polyfill": "^6.9.1",
    "classnames": "^2.2.5",
    "date-fns": "^1.3.0",
    "draft-js": "^0.7.0",
    "elemental": "^0.5.14",
    "history": "^3.0.0",
    "humps": "^1.1.0",
    "immutable": "^3.8.1",
    "is-absolute-url": "^2.0.0",
    "lodash-es": "^4.13.1",
    "moment": "^2.13.0",
    "normalizr": "^2.1.0",
    "query-string": "^4.2.2",
    "raven-js": "^3.1.0",
    "rc-switch": "^1.4.2",
    "rc-tooltip": "^3.3.5",
    "react": "^15.1.0",
    "react-addons-css-transition-group": "^15.1.0",
    "react-addons-shallow-compare": "^15.1.0",
    "react-dom": "^15.1.0",
    "react-dropzone": "^3.5.1",
    "react-highlighter": "^0.3.2",
    "react-immutable-proptypes": "^1.7.1",
    "react-masonry-component": "^4.0.4",
    "react-modal": "^1.3.0",
    "react-nl2br": "^0.1.1",
    "react-redux": "^4.4.5",
    "react-relay": "^0.9.0",
    "react-router": "^2.5.0",
    "react-router-redux": "^4.0.5",
    "react-router-relay": "^0.13.3",
    "react-router-scroll": "^0.2.0",
    "react-select": "^1.0.0-beta9",
    "react-slick": "^0.12.2",
    "react-url": "^1.0.0",
    "reactable": "^0.13.2",
    "recompose": "^0.20.0",
    "recompose-relay": "^0.3.0",
    "redux": "^3.5.2",
    "redux-api-middleware": "^1.0.2",
    "redux-form": "^5.2.5",
    "redux-immutable": "^3.0.6",
    "redux-saga": "^0.10.5",
    "reselect": "^2.5.1",
    "sanitize.css": "^4.0.0",
    "speakingurl": "^9.0.0",
    "superagent": "^2.0.0",
    "validator": "^5.4.0",
    "whatwg-fetch": "^1.0.0"
  },
  "devDependencies": {
    "babel-core": "^6.10.4",
    "babel-loader": "^6.2.4",
    "babel-plugin-react-relay": "^0.9.0",
    "babel-plugin-transform-react-constant-elements": "^6.9.1",
    "babel-plugin-transform-react-inline-elements": "^6.8.0",
    "babel-plugin-transform-react-pure-class-to-function": "^1.0.1",
    "babel-plugin-transform-react-remove-prop-types": "^0.2.7",
    "babel-plugin-transform-runtime": "^6.9.0",
    "babel-preset-es2015": "^6.9.0",
    "babel-preset-es2015-webpack": "^6.4.1",
    "babel-preset-react": "^6.5.0",
    "babel-preset-react-hmre": "^1.1.1",
    "babel-preset-stage-0": "^6.5.0",
    "babel-runtime": "^6.9.2",
    "bootstrap": "github:twbs/bootstrap#v4-dev",
    "bootstrap-datepicker": "^1.6.1",
    "carte-blanche": "^0.2.3",
    "carte-blanche-react-plugin": "^0.2.2",
    "carte-blanche-source-plugin": "^0.1.0",
    "chalk": "^1.1.3",
    "chart.js": "^1.1.1",
    "compression": "^1.6.2",
    "cross-env": "^1.0.8",
    "css-loader": "^0.23.1",
    "enzyme": "^2.3.0",
    "eonasdan-bootstrap-datetimepicker": "^4.15.35",
    "eventsource-polyfill": "^0.9.6",
    "expect": "^1.20.1",
    "expect-jsx": "^2.6.0",
    "exports-loader": "^0.6.3",
    "expose-loader": "^0.7.1",
    "express": "^4.14.0",
    "extract-text-webpack-plugin": "^1.0.1",
    "fastclick": "^1.0.6",
    "file-loader": "^0.9.0",
    "font-awesome": "^4.6.3",
    "gmaps": "^0.4.24",
    "gulp": "^3.9.1",
    "handlebars": "^4.0.5",
    "highcharts": "^4.2.5",
    "hint.css": "^2.3.1",
    "image-webpack-loader": "^1.8.0",
    "imports-loader": "^0.6.5",
    "ip": "^1.1.3",
    "jquery": "^2.2.4",
    "jquery-ui-touch-punch": "^0.2.3",
    "jquery.maskedinput": "^1.4.1",
    "json-loader": "^0.5.4",
    "laravel-elixir": "^6.0.0-4",
    "laravel-elixir-uncss": "^2.1.0",
    "material-design-icons": "^2.2.3",
    "minimist": "^1.2.0",
    "ngrok": "^2.2.1",
    "normalize.css": "^4.1.1",
    "offline-plugin": "^3.4.0",
    "plop": "^1.5.0",
    "postcss-cssnext": "^2.6.0",
    "postcss-focus": "^1.0.0",
    "postcss-import": "8.1.0",
    "postcss-loader": "^0.9.1",
    "postcss-reporter": "^1.3.3",
    "progressbar.js": "^1.0.1",
    "raw-loader": "^0.5.1",
    "rc-slider": "^3.7.2",
    "react-bootstrap-table": "^2.3.6",
    "react-motion": "^0.4.4",
    "rimraf": "^2.5.2",
    "select2": "^4.0.3",
    "select2-bootstrap-theme": "0.1.0-beta.7",
    "shelljs": "^0.7.0",
    "style-loader": "^0.13.1",
    "sw-precache": "^3.2.0",
    "sweetalert": "^1.1.3",
    "twitter-bootstrap-wizard": "^1.2.0",
    "url-loader": "^0.5.7",
    "webpack": "^2.1.0-beta.13",
    "webpack-dev-middleware": "^1.6.1",
    "webpack-hot-middleware": "^2.10.0",
    "webpack-manifest-plugin": "^1.0.1",
    "why-did-you-update": "0.0.8"
  },
  "engines": {
    "npm": ">=3"
  },
  "react-relay-schema": "http://api.pickuphub.net/schema.json",
  "scripts": {
    "analyze": "node ./internals/scripts/analyze.js",
    "build": "npm run build:clean && npm run build:webpack && npm run build:gulp",
    "build:clean": "rimraf ./web/build-webpack/*",
    "build:dll": "node ./internals/scripts/dependencies.js",
    "build:gulp": "gulp --production",
    "build:webpack": "cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --bail --color",
    "generate": "plop --plopfile internals/generators/index.js",
    "npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
    "postinstall": "npm run build:dll",
    "postsetup": "npm run build:dll",
    "preinstall": "npm run npmcheckversion",
    "start": "npm run start:tunnel",
    "start:tunnel": "cross-env NODE_ENV=production node internals/server"
  }
}
EN

回答 1

Stack Overflow用户

发布于 2016-06-30 09:21:11

我有一个完全相同的问题后,添加“点菜-布兰奇”到一个项目,这是很好的工作之前。当您的控制台中出现错误时.要开始调查,只需转到"node_modules/webpack/lib/Compilation.js“文件并滚动到"594”行(就像错误告诉您的那样)。然后,在这594行中,我对文件做了一些修改:

代码语言:javascript
复制
if (!d.getWarnings) {
  console.info('doh!', d.module.dependenciesErrors);
}

因为我只输出"module.dependenciesErrors",所以我已经走得更远了,但是您可以从输出"d“开始。

正如错误告诉您的,"d.getWarnings“不是一个函数!如果我们可以检测错误案例,使用"console.info“,我们就可以开始调查了。

现在我仍然完全不知道为什么"d“突然没有了"getWarnings”函数,其他所有的d显然都有它(否则webpack编译就不会起作用了:P)

但是现在我开始明白真正的原因是什么,导致错误的最终我想->点菜-blanche没有找到一些文件夹。-非常烦人的这不能报告给控制台.

我认为这个"d.getWarnings不是一个函数“可能会发生在所有可能的依赖关系问题/错误中--它不会直接与carte或此处提到的:隧道脚本或其他相关。我认为,在webpack项目中构建依赖关系时出现的任何错误都会导致这种情况。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38066126

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档