npm,clojurescript , ClojureScript Node.js REPL issue
ClojureScript Node.js REPL issue
Question:
Tag: npm,clojurescript
I'm following the instructions to run ClojureScript Node.js REPL: https://github.com/clojure/clojurescript/wiki/Quick-Start
Everything works fine, but in the "Node.js REPL" section, I got the errors with rlwrap java -cp cljs.jar:src clojure.main node_repl.clj
.
node.js> rlwrap java -cp cljs.jar:src clojure.main node_repl.clj
Exception in thread "main" java.io.FileNotFoundException: Could not locate cljs/build__init.class or cljs/build.clj on classpath., compiling:(/Users/smcho/Desktop/clojurescript/node.js/node_repl.clj:2:1)
at clojure.lang.Compiler.load(Compiler.java:7249)
...
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate cljs/build__init.class or cljs/build.clj on classpath.
at clojure.lang.RT.load(RT.java:449)
...
at clojure.lang.Compiler.load(Compiler.java:7237)
... 9 more
I found that the cljs
directory is in the out
directory, but the cljs
does not have build.clj
nor build__init.class
.

What might be wrong?
Answer:
I think the node_repl.clj
has an error.
(require 'cljs.repl)
;;; (require 'cljs.build) ;; ERROR?
(require 'cljs.build.api) ;; <-- Replaced
(require 'cljs.repl.node)
(cljs.build.api/build "src"
{:main 'hello-world.core
:output-to "out/main.js"
:verbose true})
(cljs.repl/repl (cljs.repl.node/repl-env)
:watch "src"
:output-dir "out")
Now everything seems to work fine.
Related:
node.js,npm,bower
Node JS and NPM was working well before. Recently I have re-installed the Node JS, NPM and the problem started. After I install a module like example npm install -g bower, the module gets installed successfully but bower -v gives 'bower' is not recognized as an internal or external command,...
node.js,express,github,npm,gh-pages
I have a project here that is on github. I created a gh-pages branch to make it hosted on github pages. The link they gave me to my hosted site is here. I am pretty new to web apps and especially new to MEAN stack web apps. My question is...
node.js,express,npm
I am trying to get my hands dirty with making node api following this tutorial https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens problem is that when I execute $ nodejs server.js I get this error { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' } js-bson: Failed to load c++ bson extension, using pure JS version {...
node.js,gruntjs,npm
After establishing a node virtualenv using nodeenv, I use source /bin/activate to switch into the correct directory, update npm, and execute npm install -g grunt or npm install -g grunt-cli and I recieve the same error: npm ERR! Linux 3.13.0-53-generic npm ERR! argv "node" "/home/{redacted-home-dir}/NodeProjects/vue/bin/npm" "install" "-g" "grunt-cli" npm ERR!...
node.js,gruntjs,npm,gulp,bower
I run the following command in my bash and I get the related results: [email protected]:~$ sudo npm install -g grunt-cli /usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt [email protected] /usr/local/lib/node_modules/grunt-cli ├── [email protected] ├── [email protected] ([email protected]) └── [email protected] ([email protected], [email protected]) and [email protected]:~$ grunt /usr/bin/env: node: No such file or directory I also have try to install...
clojure,clojurescript
How can I create a global object, attached to the window, and attach a string and a function to that object, in ClojureScript? For example, an myobject that looks like: {"foo": function () {..}, "bar": "somestring"} myobject.foo => function () { .. } myobject.bar => "somestring"...
npm,package
I've run into a issue where I try to update a package on a remote server, specifically the mongoose package. If I run npm mongoose --version it will return a version number of 1.3.10. However in package.json the version specified is ^2.7.4. I've tried to run npm update and it...
javascript,angularjs,node.js,npm
I am new to nodejs, npm also angularjs. I have read and tried the angularjs tutorial project hosted on https://github.com/angular/angular-phonecat.git, which for me is really exciting because it shows how easy to maintain the modules with bower, testing with jasmine and karma and perform e2e with protractor using npm command,...
node.js,npm,package.json
Just a simple question : in my node.js project, how could I just run the postinstall script, without running install before ? FYI, this is my package.json : { "name": "gestionclientjs", ..., "dependencies": { ... }, "repository": {}, "devDependencies": { ... }, "engines": { "node": ">=0.10.0" }, "scripts": { "test":...
css,node.js,sass,npm,gulp
I want to switch from less to sass so I installed gulp-sass with npm and modified my gulpfile to compile sass instead of less (nothing else changed). Sadly gulp doesn't compile my .scss file to css and after googling and trying all i could think of it still doesn't compile....
function,clojure,clojurescript
I'm trying to write a function in clojure that calls a condition for each value in a vector; the function should return the OR of the result of the condition applied to each value. Eg I have a vector [1 2 3 4] and a condition (>= x 3) where...
node.js,npm,mkdir
I want to run this simple command in an npm script called prepare_build: ... scripts: { "prepare_build" : "mkdir -p dist/lib/{js,css}" } ... running npm run prepare_build would create a single directory dist/lib/{js,css} whereas running the command in the console would create both dist/lib/js and dist/lib/css. What am I doing...
npm,browserify,lodash,package.json
lodash supports custom builds with only a subset of the functionality / size. Creating a custom build is a breeze with lodash-cli. What's the recommended way to take this custom build and integrate it into the project? (using npm / browserify). Do I create a custom build command that creates...
node.js,express,dependencies,npm
I'm trying to install express through cmd in windows. My problem is installing dependencies after i've successfully installed express and built a skeleton of the framework. It requires to install dependencies. It even tells me the code line cd Myprojectname && npm install But it says npm is not recognized...
node.js,npm,cordova-plugins,visual-studio-cordova,plugman
I have a local plugin, which I'm trying to install to a Cordova project. Adding it through VS works like a charm, but when I'm building it, plugman tries to retrieve the plugin from the registry (npm http GET http://registry.cordova.io/[Plugin]/[Version]) and the build fails, because this plugin only exist locally....
node.js,npm,reactjs,jsx
Problem: I execute the following command from the macintosh terminal: $ jsx --watch src/ build/ I recieve the following output error from the terminal: -bash: jsx: command not found Relevant information: I am following the following tutorial: https://facebook.github.io/react/docs/getting-started.html I executed the following command from the tutorial with positive output: $...
node.js,npm,pm2
I tried updating pm2 with "npm install [email protected] -g" (Cent OS 6) but received the following error. Now, i am no longer able to use "pm2 list" (it says command not found). Your help will be highly appreciated. npm ERR! Linux 2.6.32-042stab094.8 npm ERR! argv "node" "/home/username/local/bin/npm" "install" "pm2" "-g"...
clojurescript,om
I am trying to display a component with om, as soon as the data needed for this widget arrives. I came up with the following (roughly): (def data (atom {})) (go (let [response (<! (http/get "../rest/ds" ))] (reset! data (:result (:body response))))) (om/root (fn [app owner] (reify om/IInitState (init-state [_]...
database,node.js,mongodb,npm,aggregation-framework
What is the best way to return all documents in a collection if I want document.a == document.b? I've tried db.collection.aggregate([ { $match: { $eq: [ '$a', '$b' ] } }]) But it returns with no errors or results, because I assume it is literally matching strings "$a" and "$b"....
node.js,npm
When executing npm view [email protected] dependencies the dependencies are not displayed uniformly. What does it mean if a dependency is marked with a single quote and green font? What does it mean if a dependency is in a white font? ...
python,flask,clojurescript
I have a small Flask app and I want to use some ClojureScript to enhance the user experience on the client-side. Now I have trouble serving clojurescript via flask, as the paths get mixed up. Flask asserts that static files like Javascript scripts lie in a directory static. I have...
node.js,windows,batch-file,npm
I have started to develop a web application project on my Windows machine, for which I use npm, bower and the nodejs HTTP server. For easier start of the HTTP server, I created the batch file: @echo off title HTTP Server npm start npm start starts the http-server. For that...
node.js,npm,packages,software-distribution
I wrote a node package which contains breaking changes in the next release. Does there exist a way to notify developers about that via console while upgrading via npm?
javascript,node.js,request,npm
Using nw.js, I am just trying to save images in an array of img elements with different random names. But having a few errors, is something wrong with my code? for (i = 0; i < imgs.length; i++) { request(imgs[i].getAttribute('src')).on('error', function(err) { throw err }).pipe(fs.createWriteStream('data/imgs/' + randomString)) } imgs[] is...
npm,gulp
I want to get each of the file names in 2 directories (helpers/ and dialogs/) into an array without the file extension using Gulp and/or NPM. Note that the array will be pre-populated with values - I need to append the file names to this array. In other words, my...
node.js,npm,reactjs,browserify,html-datalist
I would like to use a node.js module from https://github.com/asbjornenge/react-datalist using browserify. I did install the module locally at my working directory. In that directory, I created a javascript file, main.jsx var React = require('react'); var ReactDatalist = require('react-datalist'); var options = ['apple','orange','pear','pineapple','melon']; React.render(<ReactDatalist list="fruit" options={options} />, document.body); Then, I...
ssl,npm,tsd
I am following the Angular 2 quick start guide and I'm stuck right at the beginning of it. My company is filtering our network connections and modifying SSL negociation. In a man in the middle style they assign a self signed certificate as the CA of the destination's certificate. Therefore...
javascript,json,node.js,npm
I know this is a common question and I tried researching on here, but none of the answers have seemed to help me thus far. I am following this tutorial to learn node, and after I try to install the package.json I received the following errors: npm ERR! install Couldn't...
clojure,clojurescript
Is there any way to import a record type, that works in Clojure as well as ClojureScript? As far as I can tell it's (ns x (:import y [A B])) for Clojure, (ns x (:require y :refer [A B])) for ClojureScript, and each is invalid for the respective other.
npm
All documentation I have seen indicates that using --save argument with npm install should update the dependencies in package.json. This does not work for me. Packages install successfully without any error in the npm console output, but `package.json' remains unchanged. What am I missing? I have seen nothing in my...
node.js,express,npm
I am using this tutorial https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens to learn about node with restful authentication. I am getting 404s in the route when I post at this http://localhost:8090/api/authenticate Here is the response that I get Cannot POST /api/authenticate and the console shows 404 POST /api/authenticate 404 2.465 ms - 30 here is...
javascript,node.js,npm
I'm trying to make a Node module that, when installed with -g, will run by a single command from a terminal. All tutorials show its pretty straightforward, so I don't know what I'm missing. Here's what I've done: Package.json: ... "bin": { "myapp": "./lib/myapp.js" }, ... npm publish npm install...
javascript,gruntjs,npm,minify
I'm using grunt and sass and I'm looking for a sass-like feature to import any JS file I like to and combine them to 1 file via some config depending on the directory I am in. Example directories: startpage file1.js file2.js importjs.json page1 file3.js file4.js importjs.json global global1.js global2.js Each...
javascript,jquery,node.js,npm,browserify
I'm following this short tutorial on getting started with Browserify Getting Started with Browserify. Despite following everything exactly jquery isn't working on the page when bundled,ie. the button element in my app.js code below is not appended to the body. Have checked everything I can think of using chrome dev...
node.js,osx,npm
I installed module by sudo npm install -g xxx in OS X, and the command echoes the module was installed in /usr/local/lib/node_modules/xxx. But the require('xxx') still fails claiming `Cannot find module 'xxx'. Only installing the module locally again by sudo npm install xxx can fix the error. Anything need to...
javascript,node.js,mongodb,npm
I'm having serious issues with an app I am building with Node.js, Express, MongoDB and Mongoose. Last night everything seemed to work when I used nodemon server.js to `run the server. On the command line everything seems to be working but on the browser (in particular Chrome) I get the...
json,node.js,npm
I'm trying to install grunt, but no luck. npm install -g grunt-cli --registry http://registry.npmjs.org/ gives this error: npm ERR! registry error parsing json npm ERR! Darwin 14.3.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "grunt-cli" "--registry" "http://registry.npmjs.org/" npm ERR! node v0.12.4 npm ERR! npm v2.10.1 npm ERR! Unexpected token <...
node.js,npm,command-line-interface
I wrote a simple 'addheader' node module and published it on npm. It contains a cli script which I registered in the package.json config-file in the bin property as follows: { "name" : "addheader", "bin" : "./addHeaderCli.js" } Installing the module with "npm install addheader" I can see the cli...
node.js,bash,npm,circleci
Is it possible to install npm package only if it has not been already installed? I need this to speed up test on CircleCI, but when I run npm install [email protected] etc. it always downloads things and installs them from scracth, however, node_modules folder with all modules is already present...
node.js,cmd,npm,command-prompt,browser-sync
Trying to install BrowserSync I've followed the steps to install the package through the command line, installed node.js and then I went on to install npm through the command line. Now when I try to install browser-sync with the following line npm install -g browser-sync you will see it is...
node.js,npm,return-value
I am tyring to create and return a javascript function object from a function that is called from a c++ node addon. The object was getting created, but wasn't getting returned by the function. callback function that creates an object named cursor var callback_fn = function(record){ var res = new...
javascript,node.js,gruntjs,npm,grunt-contrib-concat
Working on putting together a base Gruntfile.js for some upcoming projects. Starting in on a new computer so everything has been a fresh build. Installed Node and NPM using Homebrew, and then installed Grunt globally, as well as in my local directory. Here is my package.json: { "name": "timespent-prototype", "version":...
javascript,node.js,npm,reactjs,webpack
I'm creating a React Node.js app and I'm trying to generate a Webpack bundle containing the React source code I loaded from NPM. However, it seems that the React code from NPM cannot be used directly in the client. It triggers this error: Uncaught ReferenceError: development is not defined The...
clojurescript
I have an existing web UI that I would like to be able to call a function written in ClojureScript. The function would be in a separate ClojureScript module (cs_func.js file) that does not need access to the DOM. I can't find any examples on how to do this.
backbone.js,npm,webpack
I have installed backbone and backbone.babysitter trough npm. When I use backbone in my scripts like this: import Backbone from "backbone"; It loads the installed backbone version 1.2.1. This works fine until I want to use backbone.babysitter. When backbone.babysitter loads it needs to add properties to backbone itself. But the...
amazon-ec2,npm,install,runtime-error
here is what i get when i try to execute this command (the 3rd command - in ec2 amazon) The next step is to install NPM(Node package manager). Type the following commands: 1. git clone https://github.com/isaacs/npm.git 2. cd npm **3. sudo make install** and here is the error i get:...
npm,karma-runner,bower,lodash
I'm using lodash in my tests, Not using webpack or browserify (don't need to). I found that the default npm build differs from what's in bower. I could of course use bower version, but I'm curious if I can use npm's instead (it's already there for Gulp). For bower I...
node.js,npm
I switched from Windows to Mac. When I'm trying to install npm modules, the packages and their dependencies are created inside the project root directory. On Windows the module was installing into ./node_modules, with all dependencies inside module folder. Is there something I need to configure to make it work...
node.js,npm,package.json
I'm trying to update my node packages/modules and a lot of people (many from StackOverflow) recommended 'npm-check-updates' so I downloaded via npm and ran it. It gave me this error and I'm not sure what's wrong. Is something wrong with my PATH variable in system settings or something? I can't...
angularjs,gruntjs,npm,sails.js
i am using sails js backend and frontend angularjs. i have given npm install. npm install package show this error: npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer [email protected] wants [email protected]~0.4.0 npm ERR! peerinvalid Peer [email protected] wants [email protected]>=0.4.0 npm ERR! peerinvalid...