Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6988197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:02:39+00:00 2026-05-27T19:02:39+00:00

I’m building an app consisting of private npm repos built in CoffeeScript. To keep

  • 0

I’m building an app consisting of private npm repos built in CoffeeScript. To keep deployment language-agnostic, and allow each app to specify its version of CoffeeScript, I’m including CoffeeScript as a dependency in each library, and building into JavaScript upon npm installation.

npm installation works fine for standalone repos, but fails when I try to install a repo that depends on another repo being built.

So if I have repo-a, whose package.json includes this:

"dependencies": {
  "coffee-script": "~1.2.0"
},
"scripts": {
  "install": "./node_modules/coffee-script/bin/cake install"
}

and repo-b, whose package.json includes this:

"dependencies": {
  "coffee-script": "~1.2.0",
  "repo-a": "git+ssh://git@mydomain.com:myrepo.git"
},
"scripts": {
  "install": "./node_modules/coffee-script/bin/cake install"
}

where both have a Cakefile that looks like this, with an install task called on an npm install hook:

{print} = require "util"
{spawn} = require "child_process"

coffee = "./node_modules/coffee-script/bin/coffee"

echo = (child) ->
  child.stdout.on "data", (data) -> print data.toString()
  child.stderr.on "data", (data) -> print data.toString()
  child

install = (cb) ->
  console.log "Building..."
  echo child = spawn coffee, ["-c", "-o", "lib", "src"]
  child.on "exit", (status) -> cb?() if status is 0

task "install", "Install, build, and test repo", install

npm install works for for repo-a, but fails for repo-b with this message:

sh: ./node_modules/coffee-script/bin/cake: No such file or directory

at which point an unfinished ___coffee-script.npm directory exists in node_modules.

Of course it would be much easier to use a app.js wrapper, but I need to deploy JavaScript, not CoffeeScript. Can anyone tell me how I could get this to work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:02:40+00:00Added an answer on May 27, 2026 at 7:02 pm

    Two things.

    1. If you’re running cake from an npm command, you can just specify cake install or cake build as the scripts.install field. This will run after coffee-script has been installed locally, and its bin linked appropriately (with a shim on windows), and will run with a PATH environ such that the locally installed cake is used rather than anything else in the system path.
    2. If you’re not running this from an npm command, but you are nonetheless expecting that coffee-script has already been installed locally via npm (which it looks like), then you should probably be hitting ./node_modules/.bin/cake or ./node_modules/.bin/coffee rather than diving into the package internals.

    If you are not installing coffee-script with npm, but instead using some git submodules or something, then you’re on your own 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.