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

env values in npm.start not handled correctly #615

Closed
ORESoftware opened this issue Aug 22, 2015 · 6 comments
Closed

env values in npm.start not handled correctly #615

ORESoftware opened this issue Aug 22, 2015 · 6 comments

Comments

@ORESoftware
Copy link

Something must have changed with the nodemon module itself since my same package.json settings suddenly began to error out, as you can see from this command:

image

looks like in your library you are setting the NODE_ENV variable the unix way, but that doesn't work on windows, you need to use set NODE_ENV=

@remy
Copy link
Owner

remy commented Aug 22, 2015

... Between what versions?

On Sat, 22 Aug 2015 04:44 Operations Research Engineering +Software <
notifications@github.com> wrote:

Something must have changed with the nodemon module itself since my same
package.json settings suddenly began to error out, as you can see from this
command:

[image: image]
https://cloud.githubusercontent.com/assets/11139560/9422357/522d72c6-4845-11e5-8b6c-6b3bf727e2e4.png

looks like in your library you are setting the NODE_ENV variable the unix
way, but that doesn't work on windows, you need to use set NODE_ENV=


Reply to this email directly or view it on GitHub
#615.

@ORESoftware
Copy link
Author

let me check

@ORESoftware
Copy link
Author

this problems started happening about 2 weeks ago, so if there was a recent version change that was it. And it happens for me on both Windows and Mac OSX.

$ NODE_ENV=development nodemon ./bin/www
24 Aug 15:55:06 - [nodemon] v1.4.1
24 Aug 15:55:06 - [nodemon] to restart at any time, enter `rs`
24 Aug 15:55:06 - [nodemon] watching: *.*
24 Aug 15:55:06 - [nodemon] starting `NODE_ENV=production ./bin/www "node ./bin/www"`
sh: ./bin/www: No such file or directory
util.error: Use console.error instead
[nodemon] failed to start process, "NODE_ENV=production" exec not found
exception in nodemon killing node
Error: Uncaught, unspecified "error" event.
    at Error (native)
    at emit (events.js:87:13)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/nodemon/lib/monitor/run.js:114:11)
    at ChildProcess.emit (events.js:110:17)
    at Process.ChildProcess._handle.onexit (child_process.js:1074:12)

----------------------------------------------------------
If appropriate, please file an error with the output from:
$ node /usr/local/bin/nodemon ./bin/www --dump
At http://github.com/remy/nodemon/issues/new
----------------------------------------------------------

CACSVML-13295:sc-admin-ui-express amills001c$ node /usr/local/bin/nodemon ./bin/www --dump
24 Aug 15:55:40 - [nodemon] v1.4.1
24 Aug 15:55:40 - [nodemon] to restart at any time, enter `rs`
24 Aug 15:55:40 - [nodemon] watching: *.*
--------------
node: v0.12.7
nodemon: v1.4.1
command: node /usr/local/bin/nodemon ./bin/www --dump
cwd: /Users/amills001c/WebstormProjects/ORESoftware/sc-admin-ui-express
OS: darwin x64
--------------
{ run: false,
  system: 
   { cwd: '/Users/amills001c/WebstormProjects/ORESoftware/sc-admin-ui-express',
     useFind: true,
     useWatch: false,
     useWatchFile: false },
  required: false,
  dirs: [ '/Users/amills001c/WebstormProjects/ORESoftware/sc-admin-ui-express' ],
  timeout: 1000,
  options: 
   { dump: true,
     ignore: 
      [ '.git',
        'node_modules',
        'bower_components',
        '.sass-cache',
        re: /\.git|node_modules|bower_components|\.sass\-cache/ ],
     watch: [ '*.*', re: /.*\..*/ ],
     restartable: 'rs',
     execMap: { py: 'python', rb: 'ruby' },
     stdin: true,
     runOnChangeOnly: false,
     verbose: false,
     stdout: true,
     execOptions: 
      { script: 'node ./bin/www',
        exec: 'NODE_ENV=production',
        args: [ './bin/www' ],
        scriptPosition: 1,
        nodeArgs: undefined,
        ext: 'js',
        env: {},
        execArgs: [] },
     monitor: 
      [ '*.*',
        '!/Users/amills001c/WebstormProjects/ORESoftware/sc-admin-ui-express/.git/**/*',
        '!/Users/amills001c/WebstormProjects/ORESoftware/sc-admin-ui-express/node_modules/**/*',
        '!/Users/amills001c/WebstormProjects/ORESoftware/sc-admin-ui-express/bower_components/**/*',
        '!.sass-cache' ] },
  load: [Function],
  reset: [Function: reset],
  lastStarted: 0,
  loaded: [],
  command: 
   { raw: 
      { executable: 'NODE_ENV=production',
        args: [ './bin/www', 'node ./bin/www' ] },
     string: 'NODE_ENV=production ./bin/www "node ./bin/www"' },
  offset: 0 }
--------------

@ORESoftware
Copy link
Author

if you look in the above dump, somehow nodemon is turning this:

$ NODE_ENV=development nodemon ./bin/www

into this

24 Aug 15:55:06 - [nodemon] starting `NODE_ENV=production ./bin/www "node ./bin/www"`

this is dreadful, I cannot use nodemon and I need it! like I said this problem is occuring on both Windows and Mac...

@ORESoftware
Copy link
Author

I hope I am not right, but it looks like something is really wrong right now with your lib

@ORESoftware
Copy link
Author

that dump was from OSX, but in the screenshot at the very top, the same exact thing happens on Windows

@ORESoftware ORESoftware changed the title nodemon + ms windows nodemon - new problem on both Windows and OSX Aug 24, 2015
@remy remy changed the title nodemon - new problem on both Windows and OSX env values in npm.start not handled correctly Aug 31, 2015
@remy remy closed this as completed in 5e07bfe Sep 19, 2015
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

2 participants