linemanjs / lineman

Lineman helps you build fat-client JavaScript apps. It produces happiness by building assets, mocking servers, running specs on every file change
MIT License
1.18k stars 83 forks source link

Error missing script: ./cyclic.js when I try to install lineman with npm 2.x #335

Closed mariusmateoc closed 9 years ago

mariusmateoc commented 9 years ago

This is what I get after I run sudo npm install -g lineman

> js2coffee@0.2.7 preinstall /usr/local/lib/node_modules/lineman/node_modules/js2coffee
> npm run-script ./cyclic.js

npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "run-script" "./cyclic.js"
npm ERR! node v0.10.33
npm ERR! npm  v2.1.8

npm ERR! missing script: ./cyclic.js
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>
|
npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/lib/node_modules/lineman/node_modules/js2coffee/npm-debug.log

I checked the /usr/local/lib/node_modules/lineman/node_modules/js2coffee folder and it seems that cyclic.js file is there. This is how my npm-debug.log flie looks from the about location:

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'run-script', './cyclic.js' ]
2 info using npm@2.1.8
3 info using node@v0.10.33
4 verbose node symlink /usr/local/bin/node
5 verbose stack Error: missing script: ./cyclic.js
5 verbose stack     at run (/usr/local/lib/node_modules/npm/lib/run-script.js:130:19)
5 verbose stack     at /usr/local/lib/node_modules/npm/lib/run-script.js:81:5
5 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:51:40
5 verbose stack     at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:349:17)
5 verbose stack     at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:126:33)
5 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:316:48
5 verbose stack     at evalmachine.<anonymous>:207:20
5 verbose stack     at OpenReq.Req.done (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:141:5)
5 verbose stack     at OpenReq.done (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:61:22)
5 verbose stack     at Object.oncomplete (evalmachine.<anonymous>:107:15)
6 verbose cwd /usr/local/lib/node_modules/lineman/node_modules/js2coffee
7 error Darwin 14.0.0
8 error argv "node" "/usr/local/bin/npm" "run-script" "./cyclic.js"
9 error node v0.10.33
10 error npm  v2.1.8
11 error missing script: ./cyclic.js
12 error If you need help, you may report this error at:
12 error     <http://github.com/npm/npm/issues>
13 verbose exit [ 1, true ]
xeroc commented 9 years ago

I second that! Running ArchLinux here

searls commented 9 years ago

Could you try to see if you can replicate on npm 1.x? Or looking into whether there's an upgrade for js2coffee? I suspect that js2coffee is using a since-changed way of specifying install scripts.

mariusmateoc commented 9 years ago

@searls it worked when I changed to npm 1.x. Maybe in the future you could fix it to work with npm 2.x too. I would like to fix it myself but I do not know how npm works. @xeroc for me it worked to change the npm version with nvm, changing the node version with nvm install 0.10.24 than nvm use 0.10.24.

mariusmateoc commented 9 years ago

@searls should I close the issue or edit the title to specify that it only happens on npm 2.x ?

searls commented 9 years ago

Sure but for what it's worth I don't have any more knowledge of how to fix it for npm 2 than anyone else. I would encourage you to try to check out the project (js2coffee) and debug it.

On Sat, Nov 22, 2014 at 3:17 PM, Marius Mateoc notifications@github.com wrote:

@searls should I close the issue or edit the title to specify that it only happens on npm 2.x ?

Reply to this email directly or view it on GitHub: https://github.com/linemanjs/lineman/issues/335#issuecomment-64093833

mariusmateoc commented 9 years ago

Can't install js2coffee@0.2.7 with npm 2.x this is the same version you use for dependencies. So js2coffee package is currently on v0.3.3 and can be installed with npm 2.x.

Maybe you just can update the js2coffee dependency to the latest version here you can see the changes. js2coffee@0.3.3 can be installed with npm 1.x.

searls commented 9 years ago

Yup that sounds like it'll do it. I'll try to get this out today.

On Sun, Nov 23, 2014 at 9:57 AM, Marius Mateoc notifications@github.com wrote:

Can't install js2coffee@0.2.7 with npm 2.x this is the same version you use for dependencies. So js2coffee package is currently on v0.3.3 and can be installed with npm 2.x.

Maybe you just can update the js2coffee dependency to the latest version here you can see the changes. js2coffee@0.3.3 can be installed with npm 1.x.

Reply to this email directly or view it on GitHub: https://github.com/linemanjs/lineman/issues/335#issuecomment-64120525

searls commented 9 years ago

Fixed by 45ff4f70e4aa443806866f3f9776c7d90939615f

searls commented 9 years ago

This landed in the latest lineman release

jvaldesh commented 9 years ago

It work for me: $ npm install -g npm@1.x