Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR in ./dashboard/index.js and blank page #120

Closed
GPack1 opened this issue Mar 10, 2016 · 14 comments
Closed

ERROR in ./dashboard/index.js and blank page #120

GPack1 opened this issue Mar 10, 2016 · 14 comments

Comments

@GPack1
Copy link

GPack1 commented Mar 10, 2016

executing dashboard script I get an error and script stays running on terminal but
I get a blank page on http://localhost:4040

  • [OK ] You're running version >=2.1.4 of Parse Server.
  • [OK ] You've searched through existing issues. Chances are that your issue has been reported or resolved before.

#### Environment Setup
Ubuntu 14.04
MongoDB and Parse-Server working on dev db
parse-dashboard 2.0.0

#### Steps to reproduce
execute npm run dashboard

#### Logs/Trace

user@computer:/usr/lib/node_modules$ cd parse-dashboard
user@computer:/usr/lib/node_modules/parse-dashboard$ sudo npm run dashboard

parse-dashboard@2.0.0 dashboard /usr/lib/node_modules/parse-dashboard
node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --progress --watch

Hash: c848527f64a5353b8e14
Version: webpack 1.12.14
Time: 277ms
Asset Size Chunks Chunk Names
sprites.svg 99.3 kB [emitted]
+ 1 hidden modules

ERROR in ./dashboard/index.js
Module parse failed: /usr/lib/node_modules/parse-dashboard/src/dashboard/index.js Line 8: Unexpected token
You may need an appropriate loader to handle this file type.
| * the root directory of this source tree.
| */
| import AppsManager from 'lib/AppsManager';
| import Immutable from 'immutable';
| import installDevTools from 'immutable-devtools';

@peterdotjs
Copy link
Contributor

@GPack1 can you try removing node_modules and run npm install again? It sounds like an issue with babel in your env.

@GPack1
Copy link
Author

GPack1 commented Mar 10, 2016

@peterdotjs
done but I get the same error and
these warnings on installing:

npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN prefer global cover@0.2.9 should be installed with -g
npm WARN prefer global node-gyp@3.3.1 should be installed with -g

and these

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8
npm WARN parse-dashboard@2.0.0 license should be a valid SPDX license expression

@peterdotjs
Copy link
Contributor

@GPack1 hmm the warnings are fine to ignore. I tried to run using node 5.7 and did not have any issues on OSx. I'll try later with Ubuntu.

It shouldn't matter but for the npm run dashboard you don't need sudo.

@DazChong
Copy link

@GPack1 How much is the system memory? Did your npm install ended with Killed result? If so, it is your system running out of memory and the build is incomplete.

@vferdiansyah
Copy link

I have the same problem and my npm install didn't end with Killed result.

Environment:
Ubuntu 14.04
MongoDB and Parse-Server working
Node 4.3.2
parse-dashboard 2.0.0

Logs:

> parse-dashboard@2.0.0 dashboard /home/user/parse-dashboard
> node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --progress --watch

 44% 54/94 build modulesContainer#eachAtRule is deprecated. Use Container#walkAtRules instead.
Container#eachRule is deprecated. Use Container#walkRules instead.
Container#eachDecl is deprecated. Use Container#walkDecls instead.
Node#removeSelf is deprecated. Use Node#remove.
 30% 82/240 build modulesNode#before is deprecated. Use Node#raws.before
Hash: 7efcded84f8020bf37a1  
Version: webpack 1.12.14
Time: 37203ms
              Asset     Size  Chunks             Chunk Names
dashboard.bundle.js  3.32 MB       0  [emitted]  dashboard
        sprites.svg  99.3 kB          [emitted]  
    + 998 hidden modules

@GPack1
Copy link
Author

GPack1 commented Mar 11, 2016

Finally, I removed all and reinstalled the package as local in the Home and now dashboard works.
While if I install it as global with -g option I get :

user@computer:$ cd parse-dashboard
user@computer:
/parse-dashboard$ npm install -g

parse-dashboard@2.0.0 prepublish /home/user/parse-dashboard
webpack --config webpack/publish.config.js --progress

sh: 1: webpack: not found

npm ERR! addLocal Could not install /home/user/parse-dashboard
npm ERR! Linux 3.13.0-79-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g"
npm ERR! node v5.7.1
npm ERR! npm v3.8.0
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! parse-dashboard@2.0.0 prepublish: webpack --config webpack/publish.config.js --progress
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the parse-dashboard@2.0.0 prepublish script 'webpack --config webpack/publish.config.js --progress'.
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 parse-dashboard package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack --config webpack/publish.config.js --progress
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs parse-dashboard
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls parse-dashboard
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/user/parse-dashboard/npm-debug.log

@peterdotjs
Copy link
Contributor

@GPack1 that's great to hear - I typically reserve using the global flags for modules I'll use across projects - dashboard isn't a case where you would.

@vferdiansyah what errors are you getting in the browser? Running npm run dev will produce a better stack trace.

@vferdiansyah
Copy link

After I removed node_modules and npm install again, I can open the dashboard now. But I can't find my app in the dashboard even though I already typed correct information in my config file.

@peterdotjs
Copy link
Contributor

@vferdiansyah Can you provide a screenshot of what you are seeing as well as any network/console logs.

@vferdiansyah
Copy link

screen shot 2016-03-12 at 06 25 50

Logs:
`> parse-dashboard@2.0.0 dashboard /home/user/parse-dashboard

node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --progress --watch

events.js:141
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE :::4040
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at Server._listen2 (net.js:1236:14)
at listen (net.js:1272:10)
at Server.listen (net.js:1368:5)
at EventEmitter.listen (/home/user/parse-dashboard/node_modules/express/lib/application.js:617:24)
at Object. (/home/user/parse-dashboard/Parse-Dashboard/index.js:110:5)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
59% 52/63 build modulesContainer#eachAtRule is deprecated. Use Container#walkAtRules instead.
Container#eachRule is deprecated. Use Container#walkRules instead.
Container#eachDecl is deprecated. Use Container#walkDecls instead.
Node#removeSelf is deprecated. Use Node#remove.
31% 82/231 build modulesNode#before is deprecated. Use Node#raws.before
Hash: a6759d63194cf4b82742
Version: webpack 1.12.14
Time: 37365ms
Asset Size Chunks Chunk Names
dashboard.bundle.js 3.3 MB 0 [emitted] dashboard
sprites.svg 99.3 kB [emitted]
+ 948 hidden modules`

Maybe my issue is more related to #64 since I'm deploying this in production and using nginx reverse proxy?

@peterdotjs
Copy link
Contributor

@vferdiansyah hmm could be related the nginx issue. Are you getting any useful logs in the browser console/network tabs?

@vferdiansyah
Copy link

After looking at the console, turns out the page can't access my config file. After changing the path now it works just fine. Thanks a lot!

@jijothic
Copy link

I get this error after npm install -g parse-dashboard
npm WARN unmet dependency /home/yellowdog/.npm-packages/.npm-packages/lib/node_modules/request requires qs@'~6.0.2' but will load
npm WARN unmet dependency /home/yellowdog/.npm-packages/.npm-packages/lib/node_modules/qs,
npm WARN unmet dependency which is version 6.2.0
npm WARN unmet dependency /home/yellowdog/.npm-packages/.npm-packages/lib/node_modules/parse-dashboard/node_modules/history requires qs@'^4.0.0' but will load
npm WARN unmet dependency /home/yellowdog/.npm-packages/.npm-packages/lib/node_modules/qs,
npm WARN unmet dependency which is version 6.2.0

@nyxee
Copy link

nyxee commented Sep 12, 2017

npm run start

was able to run parse-server from the downloaded source directory after npm install failed. But I get an empty dashboard.

douglasmuraoka pushed a commit that referenced this issue Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants