0
votes

I start npm but see error , i don't know fix. please help me

"D:\PhpStorm 2016.1.2\bin\runnerw.exe" D:\nodejs\node.exe D:\nodejs\node_modules\npm\bin\npm-cli.js run-script start

> [email protected] start E:\phong.pham\Developer\phpDev\pickuphub.net
> npm run start:tunnel


> [email protected] 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

Error:

Uncaught Exception...
TypeError: d.getWarnings is not a function
    at E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:594:21
    at Array.forEach (native)
    at E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:593:22
    at Array.forEach (native)
    at Compilation.reportDependencyWarnings (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:592:9)
    at Compilation.<anonymous> (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:483:8)
    at Array.forEach (native)
    at Compilation.seal (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:482:15)
    at Compiler.<anonymous> (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compiler.js:431:15)
    at E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\node_modules\tapable\lib\Tapable.js:152:11
Uncaught Exception...
undefined

Error:
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! [email protected] start:tunnel: cross-env NODE_ENV=development node internals/server npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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.

    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! [email protected] start: `npm run start:tunnel`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the [email protected] 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"
  }
}
1
have you run npm install before running npm run start:tunnel? other than that, your npm version looks pretty old, it might be worth updating that to see if that fixes itderp
i run npm install before , after i run start:tunnel show errorphong pham

1 Answers

0
votes

I'm having the exact same issue right after adding "carte-blanche" to a project which was fine working before. As the error states in your console... to start investigate, just go to your "node_modules/webpack/lib/Compilation.js" file and scroll to the line "594" (exactly like the error tells you). Then on this line 594, i've modified the file a bit:

if (!d.getWarnings) {
  console.info('doh!', d.module.dependenciesErrors);
}

Well i'm already a bit further now as i'm only outputting the "module.dependenciesErrors", but you could start by simply outputting "d".

As the error tells you, "d.getWarnings" is not a function! With the if we can detect the error case and with the "console.info" we can start investigating.

Now i still have no clue at all why "d" has suddenly no "getWarnings" function anymore, where all other d's obviously have it (or webpack Compilation would never have worked :P)

But now i'm starting to see what the real causes are, causing the error finally i guess -> carte-blanche is not finding some folders -.- Extremely annoying this can't be just reported to the console...

I think this "d.getWarnings is not a function" can happen with all possible dependencies problems/errors - it won't be related directly to carte-blanche, or the :tunnel script mentioned here or whatever. I think everything what goes wrong during dependencies build in a webpack project can cause this.