-
Notifications
You must be signed in to change notification settings - Fork 16
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
run populate command fails #4
Comments
Sorry for the delay, I have tried few installation in few Linux distribution and it works perfectly. Maybe it's a Mac issue. npm install
[...]
babel-relay-plugin@0.1.3 node_modules/babel-relay-plugin
├── graphql@0.4.18 (babel-runtime@5.8.38)
└── babel-core@5.8.38 (to-fast-properties@1.0.2, shebang-regex@1.0.0, trim-right@1.0.1, try-resolve@1.0.1, slash@1.0.0, path-exists@1.0.0, path-is-absolute@1.0.0, fs-readdir-recursive@0.1.2, babel-plugin-remove-console@1.0.1, babel-plugin-remove-debugger@1.0.1, babel-plugin-eval@1.0.1, babel-plugin-inline-environment-variables@1.0.1, babel-plugin-jscript@1.0.4, babel-plugin-property-literals@1.0.1, babel-plugin-member-expression-literals@1.0.1, babel-plugin-react-constant-elements@1.0.3, babel-plugin-undefined-to-void@1.1.6, babel-plugin-react-display-name@1.0.3, babel-plugin-constant-folding@1.0.1, babel-plugin-proto-to-assign@1.0.4, babel-plugin-dead-code-elimination@1.0.2, babel-plugin-runtime@1.0.7, globals@6.4.1, private@0.1.6, home-or-tmp@1.0.0, babel-plugin-undeclared-variables-check@1.0.2, esutils@2.0.2, convert-source-map@1.2.0, repeating@1.1.3, debug@2.2.0, js-tokens@1.0.1, is-integer@1.0.6, chalk@1.1.3, detect-indent@3.0.1, minimatch@2.0.10, output-file-sync@1.1.2, babylon@5.8.38, resolve@1.1.7, bluebird@2.10.2, source-map-support@0.2.10, json5@0.4.0, source-map@0.5.6, regenerator@0.8.40, lodash@3.10.1, regexpu@1.3.0, core-js@1.2.6)
mcastro@mariocastro /tmp/graphql-mongodb-example master npm run populate
> graphql-mongodb-example@0.0.1 populate /tmp/graphql-mongodb-example
> node_modules/babel/bin/babel-node.js scripts/populationScript.es6
576a71e48d3152984f31d8a3
mcastro@mariocastro /tmp/graphql-mongodb-example master npm start
> graphql-mongodb-example@0.0.1 start /tmp/graphql-mongodb-example
> node_modules/babel/bin/babel-node.js server.es6
Server listening at 9000 |
@sayden What did you do to fix this? I'm having the same issue. |
@Sburke0708 actually I mentioned that I don't have this issue, maybe it's because I'm not using a Mac computer and I don't have any to try |
It worked seamlessly for me on a mac. |
@AArmanD After running npm install, try running the following: |
@pmahmud Thanks. Started over. ran npm install. Then tried your populate script. Output below. I tried re-running with your read me instruction, got same error. So looks like its not being read, maybe? Tried to see if the .es6 extension is being read in babel-node but could not confirm. I am thinking that is it.
|
@AArmanD , it seems you are using unix, in that case try replacing the backslashes with slash like this: |
using mac, el capitan. If you look above \ failed so switched to / and it ran but gave the errors we are discussing. |
@AArmanD There are other ways to solve this, but here is a naive one: |
@pmahmud that didnt work. This is totally to figure out what is possibly causing this issue that no one else has so dont feel pressed. Im thinking that since your project doesnt have a .babelrc file in it, the options manager is erroring out when it doesnt find it. I know there are other ways to do set babelrc options so maybe this should not affect it. Definite side project to learn something to run this down. |
@pmahmud maybe has something to do with this. CrabDude/babel-node-debug#7. Lots has happened with babel since you build this. |
@AArmanD, @sayden is the author. I am guessing that is not related. Your error log says it cannot find babel-node at your machine. Meaning maybe the path is wrong or it was not installed properly. It's a bit weird error I would say, but you could try installing babel globally and/or separately:
|
I also got the same issue while running on windows machine.None of the solutions worked out.Any help is appreciated. |
@sudheerj In the case of Windows is probably a problem of paths. Scripts that you can find in package.json are *nix like paths that use "/" for the tree. Windows uses "" (backslashes) so those script must be rewritten to work in Windows machines. I'm sorry but I don't have any windows platform on hand right now |
Thanks Sayden.I installed babel plugins globally and changed the script paths as below.It worked fine after that. |
Nice example effort. Thank you.
There is no node_modules/babel/ folder after npm install. Run populate is trying to reference it.
`Alains-MacBook-Pro-4:graphql-mongodb-example-master klik$ npm run populate
sh: babel-node.js: command not found
npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/klik/.nvm/versions/node/v6.2.1/bin/node" "/Users/klik/.nvm/versions/node/v6.2.1/bin/npm" "run" "populate"
npm ERR! node v6.2.1
npm ERR! npm v3.9.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! graphql-mongodb-example@0.0.1 populate:
babel-node.js scripts/populationScript.es6
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the graphql-mongodb-example@0.0.1 populate script 'babel-node.js scripts/populationScript.es6'.
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 graphql-mongodb-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node.js scripts/populationScript.es6
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs graphql-mongodb-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls graphql-mongodb-example
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/klik/projects/graphql-mongodb-example-master/npm-debug.log
Alains-MacBook-Pro-4:graphql-mongodb-example-master klik$`
The text was updated successfully, but these errors were encountered: