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

bable-node not working #9835

Closed
cateradmin opened this issue Nov 29, 2016 · 5 comments
Closed

bable-node not working #9835

cateradmin opened this issue Nov 29, 2016 · 5 comments
Labels
invalid Issues and PRs that are invalid. question Issues that look for answers.

Comments

@cateradmin
Copy link

cateradmin commented Nov 29, 2016

  • Version: nodejs 6.9.1
  • Platform: windows 7
    when I try execute file using babel-node . it doesn't working on windows. codes as below. but on mac os it works well

var child_process = require('child_process');

child_process.execFile(./node_modules/.bin/babel-node,args,{
timeout: 10000,
env: {
...
}
}

the error is

API ERROR: Error: spawn ./node_modules/.bin/babel-node ENOENT

  • util.js:1026 exports._errnoException
    util.js:1026:11

  • child_process.js:193 Process.ChildProcess._handle.onexit
    internal/child_process.js:193:32

  • child_process.js:359 onErrorNT
    internal/child_process.js:359:16

  • next_tick.js:74 _combinedTickCallback
    internal/process/next_tick.js:74:11

  • next_tick.js:98 process._tickCallback
    internal/process/next_tick.js:98:9

@friedemannsommer
Copy link

The error "ENOENT" means the file you're requesting doesn't exist. This is not a nodejs error. Please check your npm install output if there are any errors.

Windows "errno constants"
https://msdn.microsoft.com/en-gb/library/5814770t.aspx

@bnoordhuis
Copy link
Member

Answered, closing.

@bnoordhuis bnoordhuis added invalid Issues and PRs that are invalid. question Issues that look for answers. labels Nov 29, 2016
@cateradmin
Copy link
Author

I check the npm install result . there is no error . Indeed, if we copy /node_modules/.bin/babel-node in windows command line and run .it said "The system cannot find the path specified"! So I think we need add one more environment variable like "C:\dev\ui\web\node_modules.bin" . after then , I open a new cmd and type into "babel-node" in any directory. it could work so it proves that environment config is effective. So i re-build and re-start. but unfortunately it is still not working

@friedemannsommer
Copy link

Just to be sure... have you "babel-cli" in your package.json?
Also you should create an issue at the babel/babel repository not at the node/nodejs repository because babel-node is not maintained by the Node.js Team.

If you want to access the babel-node command in your terminal you should run npm i -g babel-cli.

babel-cli
https://github.com/babel/babel/tree/master/packages/babel-cli

@cateradmin
Copy link
Author

oh. ok I will raise question in babel repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issues and PRs that are invalid. question Issues that look for answers.
Projects
None yet
Development

No branches or pull requests

3 participants