rvl / bower2nix

Generate nix expressions to fetch bower dependencies.
Other
6 stars 10 forks source link

SyntaxError: Unexpected strict mode reserved word when trying to run under NixOS #1

Closed olcai closed 8 years ago

olcai commented 8 years ago

Hi!

I'm trying to test your updated version of bower2nix (version 3.0.1) on my NixOS machine, and while it builds via default.nix, I cannot get it to run after installing the derivation. I get the following error when running bower2nix -v:

nix/store/ay1al3j3gvjfqdqp58kbn285qblcalir-nodejs-bower2nix-3.0.0/lib/node_modules/bower2nix/dist/bower2nix.js:26
let temp = require('promised-temp').track();
^^^
SyntaxError: Unexpected strict mode reserved word
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/nix/store/ay1al3j3gvjfqdqp58kbn285qblcalir-nodejs-bower2nix-3.0.0/lib/node_modules/bower2nix/bin/bower2nix:3:1)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

I am not very familiar with TypeScript (or JS for that part), so I think I need some help with debugging this. Any pointers? And thank you for your efforts to make bower2nix a useful tool with decent documentation!

rvl commented 8 years ago

Hi, thanks for testing! I think this is because I am running off nixos-unstable / nixos-16.03 and you're not. I have just tested on nixos-15.09 and got the same error. I will investigate ways of making it work with 15.09. I think it might be due to different nodejs version but not sure yet. Is it possible to develop from nixos-16.03?

olcai commented 8 years ago

Ah, yes, I should have mentioned that I only tried it under 15.09. It works when running against current master of nixpkgs. No need to get it working for 15.09!

Thank you and sorry for the noise!