{"id":14746,"library":"node-red-iced-coffeescript","title":"Node-RED IcedCoffeeScript Node","description":"The `node-red-iced-coffeescript` package provides a custom node for the Node-RED low-code programming platform, enabling users to execute code written in IcedCoffeeScript within their flows. Node-RED is an open-source tool for wiring together hardware devices, APIs, and online services in event-driven applications, often used for IoT and automation. IcedCoffeeScript is a superset of CoffeeScript that introduced `await` and `defer` keywords for simplified asynchronous control flow, predating the native `async/await` features in modern JavaScript. This package, currently at version 1.0.7, effectively allows Node-RED flows to leverage IcedCoffeeScript's asynchronous syntax. However, given its last update was approximately nine years ago, and `iced-coffee-script` itself has not been updated in six years, the package is considered abandoned. Its primary differentiator, async handling, has been largely superseded by standard JavaScript capabilities. The package requires `iced-coffee-script` to be installed separately.","status":"abandoned","version":"1.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/conceptuli/node-red-iced-coffeescript","tags":["javascript","node-red","iced-coffeescript","conceptuli","coffeescript"],"install":[{"cmd":"npm install node-red-iced-coffeescript","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-iced-coffeescript","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-iced-coffeescript","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This is the core compiler for IcedCoffeeScript, required at runtime by the Node-RED node. The package README explicitly states it must be installed either locally or globally. Without it, the node cannot execute IcedCoffeeScript code.","package":"iced-coffee-script","optional":false}],"imports":[{"note":"This package provides a Node-RED node, not a JavaScript/TypeScript library for direct code import. Its 'import' is handled by the Node-RED runtime after installation, making it available in the visual editor's palette for flow construction. The node typically appears under a 'function' or 'utility' category.","symbol":"Node-RED Editor Palette","correct":"Install via npm, then drag the 'iced-coffeescript' node from the palette in the Node-RED editor."},{"note":"Once installed and available in the palette, the node is conceptually 'imported' into a specific flow by dragging and dropping it onto the canvas. Configuration, including the IcedCoffeeScript code, is done via the node's editor dialog.","symbol":"IcedCoffeeScript Node (within a flow)","correct":"Wire messages into the 'iced-coffeescript' node within a Node-RED flow to execute IcedCoffeeScript logic."},{"note":"From a Node-RED runtime perspective, the package exports node definitions rather than symbols for direct application-level import. Developers consuming this package in a Node-RED environment do not use standard JavaScript import/require statements to access the node's functionality.","wrong":"import { IcedCoffeeScriptNode } from 'node-red-iced-coffeescript'","symbol":"Node Definition (for Node-RED runtime)","correct":"The Node-RED runtime automatically loads and registers the node's definition files (e.g., `.js` and `.html`) from the installed npm package."}],"quickstart":{"code":"# 1. Install Node-RED (if not already installed)\nsudo npm install -g --unsafe-perm node-red\n\n# 2. Start Node-RED\nnode-red\n\n# 3. In a new terminal, install the IcedCoffeeScript compiler globally (as recommended by the package README)\nsudo npm install -g iced-coffee-script\n\n# 4. Install the Node-RED IcedCoffeeScript node\nnpm install node-red-iced-coffeescript\n\n# 5. Restart Node-RED to load the new node\nnode-red\n\n// 6. Access the Node-RED editor (usually http://localhost:1880)\n// 7. Drag an 'Inject' node, an 'iced-coffeescript' node, and a 'Debug' node onto the canvas.\n// 8. Wire them together: Inject -> iced-coffeescript -> Debug.\n\n// 9. Double-click the 'iced-coffeescript' node to edit its code.\n//    Replace the default content with the following IcedCoffeeScript example:\n\n# IcedCoffeeScript code for the node:\nmsg.payload = \"Hello, IcedCoffeeScript!\"\n\n# Example of IcedCoffeeScript's async features (for context, if `defer` was relevant)\n# Not directly executable without an async operation, but demonstrates the syntax.\n# Assuming 'someAsyncFunction' exists and takes a callback:\n# someAsyncFunction (value) defer cb value\n# msg.payload = \"Async operation result: #{value}\"\n\nreturn msg\n\n// 10. Deploy the flow.\n// 11. Click the 'Inject' node button. Observe the output in the Debug sidebar.","lang":"coffeescript","description":"This quickstart guides you through setting up Node-RED, installing the `iced-coffee-script` compiler and the `node-red-iced-coffeescript` node, and demonstrates creating a basic Node-RED flow to execute simple IcedCoffeeScript code."},"warnings":[{"fix":"For new projects, prefer using the standard Node-RED 'Function' node with modern JavaScript (ES6+) and native `async/await` syntax, which offers similar asynchronous control flow capabilities and is actively maintained. Consider `node-red-contrib-typescript` for TypeScript support if strong typing is desired.","message":"The `node-red-iced-coffeescript` package is effectively abandoned, with its last commit over nine years ago. The underlying `iced-coffee-script` compiler also received its last update six years ago.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure `iced-coffee-script` is installed via `npm install -g iced-coffee-script` (globally) or `npm install iced-coffee-script` (locally within your Node-RED user directory) *before* attempting to use the Node-RED node.","message":"This package relies on the `iced-coffee-script` compiler, which must be installed separately, either locally or globally, for the Node-RED node to function correctly. The `node-red-iced-coffeescript` package does not bundle or automatically install this dependency.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Evaluate if IcedCoffeeScript truly provides a benefit over modern JavaScript in the Node-RED 'Function' node. If asynchronous operations are the goal, use standard `async/await` directly in JavaScript function nodes.","message":"IcedCoffeeScript's core value proposition (simplified asynchronous control flow via `await`/`defer`) has largely been superseded by native `async/await` in modern JavaScript (ES2017+). Using IcedCoffeeScript might introduce unnecessary complexity or reliance on outdated language features.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Run `npm install -g iced-coffee-script` to install the compiler globally, then restart your Node-RED instance.","cause":"The `iced-coffee-script` compiler, a peer dependency, has not been installed on the system where Node-RED is running.","error":"Error: Cannot find module 'iced-coffee-script' in Node-RED debug log."},{"fix":"Ensure the `iced-coffee-script` compiler is correctly installed. If attempting to use modern JavaScript `async/await`, switch to a standard Node-RED 'Function' node set to JavaScript, not an `iced-coffeescript` node.","cause":"This error is unlikely for IcedCoffeeScript itself, but could occur if trying to use *modern JavaScript's* `await` syntax directly in an IcedCoffeeScript node, or if the `iced-coffee-script` compiler itself is misconfigured or missing.","error":"SyntaxError: Unexpected token 'await' (or 'defer') in iced-coffeescript node."}],"ecosystem":"npm"}