command icon indicating copy to clipboard operation
command copied to clipboard

build/ path broken in Windows development environment

Open ishu3101 opened this issue 9 years ago • 13 comments

I am trying to setup up command for development. When I run npm install followed by npm run dev I get the following error message shown in the npm-debug.log file.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose run-script [ 'predev', 'dev', 'postdev' ]
6 info predev [email protected]
7 info dev [email protected]
8 verbose unsafe-perm in lifecycle true
9 info [email protected] Failed to exec dev script
10 error [email protected] dev: `NODE_ENV=development ./node_modules/.bin/babel-node ./dev-env/dev.js`
10 error Exit status 1
11 error Failed at the [email protected] dev script.
11 error This is most likely a problem with the Command package,
11 error not with npm itself.
11 error Tell the author that this fails on your system:
11 error     NODE_ENV=development ./node_modules/.bin/babel-node ./dev-env/dev.js
11 error You can get their info via:
11 error     npm owner ls Command
11 error There is likely additional logging output above.
12 error System Windows_NT 6.1.7601
13 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
14 error cwd C:\Users\%username%\Documents\Github\slash-command
15 error node -v v0.10.35
16 error npm -v 1.4.28
17 error code ELIFECYCLE
18 verbose exit [ 1, true ]

ishu3101 avatar Apr 09 '16 03:04 ishu3101

It looks like you have a very old version of node and NPM. Can you try updating to node >4 and npm > 3? If that doesn't help, please reopen!

jessepollak avatar Apr 10 '16 21:04 jessepollak

I am getting this error message shown in the npm-debug.log file after upgrading node & npm.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle [email protected]~predev: [email protected]
6 silly lifecycle [email protected]~predev: no script for predev, continuing
7 info lifecycle [email protected]~dev: [email protected]
8 verbose lifecycle [email protected]~dev: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~dev: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\%username%\Documents\Github\slash-command\node_modules\.bin;C:\Program Files\nodejs;C:\ruby215\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Gow\bin;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Git\cmd;C:\PROGRA~2\Oracle\VirtualBox;C:\Users\%username%\AppData\Local\Pandoc\;C:\Python27;C:\Python33;C:\Python27\Scripts;C:\Python27\lib\site-packages\django\bin;C:\ruby193\bin;C:\ruby200\bin;C:\Users\%username%\AppData\Roaming\npm;C:\Users\%username%\bin;C:\Users\%username%\AppData\Local\atom\bin;C:\Program Files (x86)\Microsoft VS Code\bin
10 verbose lifecycle [email protected]~dev: CWD: C:\Users\%username%\Documents\Github\slash-command
11 silly lifecycle [email protected]~dev: Args: [ '/d /s /c',
11 silly lifecycle   'NODE_ENV=development ./node_modules/.bin/babel-node ./dev-env/dev.js' ]
12 silly lifecycle [email protected]~dev: Returned: code: 1  signal: null
13 info lifecycle [email protected]~dev: Failed to exec dev script
14 verbose stack Error: [email protected] dev: `NODE_ENV=development ./node_modules/.bin/babel-node ./dev-env/dev.js`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:239:16)
14 verbose stack     at emitTwo (events.js:100:13)
14 verbose stack     at EventEmitter.emit (events.js:185:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:100:13)
14 verbose stack     at ChildProcess.emit (events.js:185:7)
14 verbose stack     at maybeClose (internal/child_process.js:850:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid [email protected]
16 verbose cwd C:\Users\%username%\Documents\Github\slash-command
17 error Windows_NT 6.1.7601
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
19 error node v5.10.1
20 error npm  v3.8.3
21 error code ELIFECYCLE
22 error [email protected] dev: `NODE_ENV=development ./node_modules/.bin/babel-node ./dev-env/dev.js`
22 error Exit status 1
23 error Failed at the [email protected] dev script 'NODE_ENV=development ./node_modules/.bin/babel-node ./dev-env/dev.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the Command package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     NODE_ENV=development ./node_modules/.bin/babel-node ./dev-env/dev.js
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs Command
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls Command
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

ishu3101 avatar Apr 10 '16 23:04 ishu3101

Can you just running this?

$ ./node_modules/.bin/babel-node ./dev-env/dev.js

jessepollak avatar Apr 11 '16 17:04 jessepollak

I'm on Windows by the way. I'm getting '.' is not recognized as an internal or external command, operable program or batch file. when I run the command.

ishu3101 avatar Apr 11 '16 21:04 ishu3101

Is there a line number attached to that? My guess is that it has to do with relative path syntax differing between Mac and Windows.

On Mon, Apr 11, 2016 at 2:27 PM ishu3101 [email protected] wrote:

I'm on Windows by the way. I'm getting '.' is not recognized as an internal or external command, operable program or batch file. when I run the command.

— You are receiving this because you modified the open/close state.

Reply to this email directly or view it on GitHub https://github.com/jessepollak/command/issues/39#issuecomment-208570514

jessepollak avatar Apr 11 '16 22:04 jessepollak

There is no line number attached to that. When I run the above command on git bash on windows, I get this error message.

Overriding 'node_modules/webpack/lib/JsonpMainTemplate.runtime.js'
Overriding 'node_modules/webpack/hot/log-apply-result.js'
fs.js:842
  return binding.mkdir(pathModule._makeLong(path),
                 ^

Error: ENOENT: no such file or directory, mkdir 'c:\Users\%username%\Documents\Github\slash-command\release\build'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:842:18)
    at Manifest.prepareBuildDir (index.js:37:8)
    at Manifest.run (index.js:15:10)
    at Object.<anonymous> (dev.js:12:10)
    at Module._compile (module.js:413:34)
    at loader (c:\Users\ishu\Documents\Github\slash-command\node_modules\babel-cli\node_modules\babel-register\lib\node.js:126:5)
    at Object.require.extensions.(anonymous function) [as .js] (c:\Users\%username%\Documents\Github\slash-command\node_modules\babel-cli\node_modules\babel-register\lib\node.js:136:7)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)

ishu3101 avatar Apr 11 '16 22:04 ishu3101

Did you ever resolve this build issue? Please reopen if you're still struggling with it — would love to help you get started.

jessepollak avatar Apr 25 '16 01:04 jessepollak

No, still struggling with the setup. See my previous message above.

ishu3101 avatar Apr 25 '16 03:04 ishu3101

@ishu3101 I just pushed a fix (above) that should resolve this issue. can you pull and try building? thanks!

jessepollak avatar May 01 '16 23:05 jessepollak

What do you mean by "Add command/build" in your instruction for adding the development build of the extension to your browser.

ishu3101 avatar May 02 '16 04:05 ishu3101

When I run npm install. I am getting this message.

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] requires a peer of react@^0.14.8 but none was installed.

ishu3101 avatar May 02 '16 04:05 ishu3101

OK, I just pushed another commit. Try pulling and npm installing again.

I mean:

  1. Navigate to chrome://extensions
  2. Check the 'Developer Mode' box
  3. Click 'Load unpacked extension' and load the command/build directory

jessepollak avatar May 02 '16 04:05 jessepollak

I still get the same message after running npm install. I also don't see the command/build directory.

ishu3101 avatar May 02 '16 04:05 ishu3101