-
Notifications
You must be signed in to change notification settings - Fork 82
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 thrown on build with 0.1.3 #56
Comments
Bah, Windows paths strikes again! Thanks, I'll try to find time to fix this one. |
I'd love to test it, I want to use ember for my new project. When do you think the fix will be ready? |
Can you try building with browserbuild directly? https://github.com/LearnBoost/browserbuild |
The build still doesn't work in the actual version 0.2 :( C:...\my-app>ember build C:...\AppData\Roaming\npm\node_modules\ember-tools\src\commands\build.js:66 |
|
Just follow the directions on the README |
Give me the string to execute please. I don't know your lib nor that browserbuild. But you know them. |
I'm saying just follow the demo on browserbuild's project site and see if it works in windows or not. |
The result is the following code, which does not display "Hello world" in the browser though: (function(){var global = this;function debug(){return debug};function require(p, parent){ var path = require.resolve(p) , mod = require.modules[path]; if (!mod) throw new Error('failed to require "' + p + '" from ' + parent); if (!mod.exports) { mod.exports = {}; mod.call(mod.exports, mod, mod.exports, require.relative(path), global); } return mod.exports;}require.modules = {};require.resolve = function(path){ var orig = path , reg = path + '.js' , index = path + '/index.js'; return require.modules[reg] && reg || require.modules[index] && index || orig;};require.register = function(path, fn){ require.modules[path] = fn;};require.relative = function(parent) { return function(p){ if ('debug' == p) return debug; if ('.' != p.charAt(0)) return require(p); var path = parent.split('/') , segs = p.split('/'); path.pop(); for (var i = 0; i < segs.length; i++) { var seg = segs[i]; if ('..' == seg) path.pop(); else if ('.' != seg) path.push(seg); } return require(path.join('/'), parent); };};require.register("lib\hithere.js", function(module, exports, require, global){ module.exports = function () { |
looks like it works then (just type So, something is up with the relative path, a fix might be to pull browserbuild in as a module and build with the module's api instead of as a binary (maybe?) |
No it doesn't output anything, neither in the console of the browser nor in the HTML code below (path is correct): <script src="my-library.js"></script> <script> hithere(); </script> |
I'm having the same problem (Win 7 x64), and I can see where stuff is going wrong, although I don't fully understand the intent, so I don't know why it's going wrong.
C:\Users...\node_modules/browserbuild/bin/browserbuild ... The problem is that the command processor is trying to execute that file directly, which it can't do because it's a JavaScript file with no file extension. Rather than .../bin/browserbuild shouldn't the command line be node .../bin/browserbuild In any case, I made that modification, but it still didn't work. The full path now looks like this: node C:\Users...\node_modules\ember-tools\src\commands/../../node_modules/browserbuild/bin/browserbuild -m index -g App -b js/ But this fails (again, under bash) with the following error: find: invalid predicate `-L' Which doesn't really make any sense to me... -Steve |
Thanks @Steve-OH Yeah, I'm relying on Looks like we may need to branch on OS and use some cmd.exe thing to find the files we hand to browserbuild. I'd love for this to work for windows users, but I'm going to leave it to windows users to provide the pull request. I have no grudge against the OS, I'd just rather spend time on other things. (sounds so mean) |
The above two changes make it the process run on my windows box. Instead of using |
Those two changes seem to do the trick. Thanks. -Steve |
Ryan, I'd be happy to do a pull request, but the two changes really "belong" to Thomas. Also, I don't have a way to test it on any *nix systems at the moment. -Steve |
Pull request created as #65 |
this fix was released to npm, so enjoy windows users 👯 |
Thanks guys, build now works on Windows :D Just one small error in the Readme: |
You say "windows users" like it's a bad thing. ;-) |
Glad to see I made some "Micro$oft Windoze" users happy :-) |
I'm having the same problem but on a Mac :( |
I got this persistent error on Windows8-64 with node.js v0.10.5 and ember-tools 0.1.3. And I just followed the simple example on your site here.:
C:\xxx\AppData\Roaming\npm\node_modules\ember-tools\src\commands\build.js:62
if (error) throw new Error(error);
^
Error: Error: Command failed: 'C:\xxx\AppData\Roaming\npm\node_modules\ember-tools\src\commands/../
../node_modules/browserbuild/bin/browserbuild' is not recognized as an internal or external command,
operable program or batch file.
The text was updated successfully, but these errors were encountered: