"Lerna List" and "Lerna Changed" Returns 0 Packages - lerna

Gist
I have a monorepo and I am using yarn workspaces and lerna to manage it. I had no issues with it until now. I need to know all the changed packages since the last release.
Issue
So I run lerna changed (docs), but this is what it returns:
info cli using local version of lerna
lerna notice cli v3.16.4
lerna info Looking for changed packages since v0.3.0
lerna info No changed packages found
Similarly, lerna doesn't find any packages when running lerna list (docs):
info cli using local version of lerna
lerna notice cli v3.16.4
lerna success found 0 packages
It seems like something is broken. But I can't find any issues in my setup.
Setup
File tree
├── lerna.json
├── package.json
├── packages
│ ├── enums
│ ├── event-sourcing
│ ├── models
│ └── utils
└── services
├── consumer
├── frontend
├── gateway
└── ideas
lerna.json
{
"packages": [
"packages/*",
"services/*"
],
"version": "0.3.0",
"useWorkspaces": "true"
}
package.json
{
"name": "cents-ideas",
"version": "0.0.0",
"workspaces": [
"packages/*",
"services/*"
],
"private": true,
"devDependencies": {
"lerna": "^3.16.4",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.0",
"typescript": "^3.6.2"
}
}
The entire repository is on GitHub, if you want to take a closer look at it.

The solution is very simple. As all my packages have a "private": true in their package.json files, I need to add the --all flag.
lerna changed --all
lerna list -all

Related

Package files into specific folder of application bundle when deploying to AWS Lambda via Serverless Framework

Context
I am using the aws-node-typescript example of the Serverless Framework. My goal is to integrate Prisma into it.
So far, I have:
Created the project locally using serverless create
Set up a PostgreSQL database on Railway
Installed prisma, ran prisma init, created a basic User model and ran prisma migrate dev successfully
Created a second users function by copying the existing hello function
Deployed the function using serverless deploy
Now in my function, when I instantiate PrismaClient, I get an internal server error and the function logs this error: "ENOENT: no such file or directory, open '/var/task/src/functions/users/schema.prisma'"
My project structure looks as follows:
.
├── README.md
├── package-lock.json
├── package.json
├── prisma
│ ├── migrations
│ │ ├── 20221006113352_init
│ │ │ └── migration.sql
│ │ └── migration_lock.toml
│ └── schema.prisma
├── serverless.ts
├── src
│ ├── functions
│ │ ├── hello
│ │ │ ├── handler.ts
│ │ │ ├── index.ts
│ │ │ ├── mock.json
│ │ │ └── schema.ts
│ │ ├── index.ts
│ │ └── users
│ │ ├── handler.ts
│ │ └── index.ts
│ └── libs
│ ├── api-gateway.ts
│ ├── handler-resolver.ts
│ └── lambda.ts
├── tsconfig.json
└── tsconfig.paths.json
Also, here's the handler for the users function:
ts
import { formatJSONResponse } from '#libs/api-gateway';
import { middyfy } from '#libs/lambda';
import { PrismaClient } from '#prisma/client'
const users = async (event) => {
console.log(`Instantiating PrismaClient inside handler ...`)
const prisma = new PrismaClient()
return formatJSONResponse({
message: `Hello, ${event.queryStringParameters.name || 'there'} welcome to the exciting Serverless world!`,
event,
});
};
export const main = middyfy(users);
The problem arises because in order to instantiate PrismaClient, the schema.prisma file needs to be part of the application bundle. Specifically, it needs to be in /var/task/src/functions/users/ as indicated by the error message.
I already adjusted the package.patterns option in my serverless.ts file to look as follows:
package: { individually: true, patterns: ["**/*.prisma"] },
Question
This way, the bundle that's uploaded to AWS Lambda includes the prisma directory in its root, here's the .serverless folder after I ran sls package (I've unzipped users.zip here so that you can see its contents):
.
├── cloudformation-template-create-stack.json
├── cloudformation-template-update-stack.json
├── hello.zip
├── serverless-state.json
├── users
│ ├── prisma
│ │ └── schema.prisma
│ └── src
│ └── functions
│ └── users
│ ├── handler.js
│ └── handler.js.map
└── users.zip
I can also confirm that the deployed version of my AWS Lambda has the same folder structure.
How can I move the users/prisma/schema.prisma file into users/src/functions/users using the patterns in my serverless.ts file?
I found a (pretty ugly) solution. If anyone can think of a more elegant one, I'm still very open to it and happy to give you the points for a correct answer.
Solving the "ENOENT: no such file or directory, open '/var/task/src/functions/users/schema.prisma'" error
To solve this, I just took a very naive approach and manually copied over the schema.prisma file from the prisma directory into the src/functions/users. Here's the file structure I now had:
.
├── README.md
├── package-lock.json
├── package.json
├── prisma
│ ├── migrations
│ │ ├── 20221006113352_init
│ │ │ └── migration.sql
│ │ └── migration_lock.toml
│ └── schema.prisma
├── serverless.ts
├── src
│ ├── functions
│ │ ├── hello
│ │ │ ├── handler.ts
│ │ │ ├── index.ts
│ │ │ ├── mock.json
│ │ │ └── schema.ts
│ │ ├── index.ts
│ │ └── users
│ │ ├── schema.prisma
│ │ ├── handler.ts
│ │ └── index.ts
│ └── libs
│ ├── api-gateway.ts
│ ├── handler-resolver.ts
│ └── lambda.ts
├── tsconfig.json
└── tsconfig.paths.json
This is obviously a horrible way to solve this, because I now have two Prisma schema files in different locations and have to make sure I always update the one in src/functions/users/schema.prisma after changing the original one in prisma/schema.prisma to keep them in sync.
Once I copied this file and redeployed, the schema.prisma file was in place in the right location in the AWS Lambda and the error went away and PrismaClient could be instantiated.
I then added a simple Prisma Client query into the handler:
const users = async (event) => {
console.log(`Instantiating PrismaClient inside handler ...`)
const prisma = new PrismaClient()
const userCount = await prisma.user.count()
console.log(`There are ${userCount} users in the database`)
return formatJSONResponse({
message: `Hello, ${event.queryStringParameters.name || 'there'} welcome to the exciting Serverless world!`,
event,
});
};
export const main = middyfy(users);
... and encountered a new error, this time, about the query engine:
Invalid `prisma.user.count()` invocation:
Query engine library for current platform \"rhel-openssl-1.0.x\" could not be found.
You incorrectly pinned it to rhel-openssl-1.0.x
This probably happens, because you built Prisma Client on a different platform.
(Prisma Client looked in \"/var/task/src/functions/users/libquery_engine-rhel-openssl-1.0.x.so.node\")
Searched Locations:
/var/task/.prisma/client
/Users/nikolasburk/prisma/talks/2022/serverless-conf-berlin/aws-node-typescript/node_modules/#prisma/client
/var/task/src/functions
/var/task/src/functions/users
/var/task/prisma
/tmp/prisma-engines
/var/task/src/functions/users
To solve this problem, add the platform \"rhel-openssl-1.0.x\" to the \"binaryTargets\" attribute in the \"generator\" block in the \"schema.prisma\" file:
generator client {
provider = \"prisma-client-js\"
binaryTargets = [\"native\"]
}
Then run \"prisma generate\" for your changes to take effect.
Read more about deploying Prisma Client: https://pris.ly/d/client-generator
Solving the Query engine library for current platform \"rhel-openssl-1.0.x\" could not be found. error
I'm familiar enough with Prisma to know that Prisma Client depends on a query engine binary that has to be built specifically for the platform Prisma Client will be running on. This can be configured via the binaryTargets field on the generator block in my Prisma schema. The target for AWS Lamda is rhel-openssl-1.0.x.
So I adjusted the schema.prisma file (in both locations) accordingly:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
}
After that, I ran npx prisma generate to update the generated Prisma Client in node_modules.
However, this hadn't resolved the error yet, the problem still was the Prisma Client couldn't find the query engine binary.
So I followed the same approach as for the schema.prisma file when it was missing:
I manually copied it into src/functions/users (this time from its location inside node_modules/.prisma/libquery_engine-rhel-openssl-1.0.x.so.node)
I added the new path to the package.patterns property in my serverless.ts:
package: {
individually: true,
patterns: ["**/*.prisma", "**/libquery_engine-rhel-openssl-1.0.x.so.node"],
},
After I redeployed and tested the function, another error occured:
Invalid `prisma.user.count()` invocation:
error: Environment variable not found: DATABASE_URL.
--> schema.prisma:11
|
10 | provider = \"postgresql\"
11 | url = env(\"DATABASE_URL\")
|
Validation Error Count: 1
Solving the Environment variable not found: DATABASE_URL. error
This time, it was pretty straightforward and I went into the AWS Console at https://us-east-1.console.aws.amazon.com/lambda/home?region=us-east-1#/functions/aws-node-typescript-dev-users?tab=configure and added a DATABASE_URL env var via the Console UI, pointing to my Postgres instance on Railway:
I usually lurk but the answer above lead me to come up with a reasonably elegant solution I felt I should share for the next poor sap to come along and try to integrate serverless and prisma in Typescript (though, I bet this solution and process would work in other build systems).
I was using the example aws-nodejs-typescript template, which is plagued with a bug which required me to apply the fix here by patching the local node_modules serverless package.
I then had to essentially walk through #nburk's answer to get myself up and running which is, as stated, inelegant.
In my travels trying to understand prisma's behavior, requirement of a platform-specific binary, and how to fix it, figured that if I could manually side-load the binary into the build folder post-compile I could get the serverless bundler to zip it up.
I came across the 'serverless-plugin-scripts' plugin, which allows us to do exactly this via serverless lifecycle hooks.
I put this in my serverless.ts:
plugins: ['serverless-esbuild', 'serverless-plugin-scripts'],
I put the following in package.json:
"scripts": {
"test": "echo 'Error: no test specified' && exit 1",
"postbuild": "yarn fix-scrape-scheduler",
"fix-scrape-scheduler": "cp ../../node_modules/.prisma/client/schema.prisma .esbuild/.build/src/functions/schedule-scrapes/. && cp ../../node_modules/.prisma/client/libquery_engine-rhel-openssl-1.0.x.so.node .esbuild/.build/src/functions/schedule-scrapes/."
},
and this also in my serverless.ts:
scripts: {
hooks: {
'before:package:createDeploymentArtifacts': 'yarn run postbuild'
}
}
This causes the 'serverless-plugin-scripts' plugin to call my post-build yarn script and fixup the .build folder that esbuild creates. I imagine that if your build system (such as webpack or something) creates the build dir under a different name (such as lib), this process could be modified accordingly.
I will have to create a yarn script to do this for each function that is individually packaged, however this is dynamic, precludes the need to keep multiple copies of schema.prisma in source, and copies the files from the dynamically generated .prisma folder in node_modules.
Note, I am using yarn workspaces here, so the location of your node_modules folder will vary based on your repo setup.
Also, I did run into this error Please make sure your database server is running at which was remedied by making sure the proper security groups were whitelisted outbound for the lambda function, and inbound for RDS. Also make sure to check your subnet ACLs and route-tables.
We ran into the same issue recently. But our context is slightly different: the path to the schema.prisma file was /var/task/node_modules/.prisma/client/schema.prisma.
We solved this issue by using Serverless Package Configuration.
serverless.yml
service: 'your-service-name'
plugins:
- serverless-esbuild
provider:
# ...
package:
include:
- 'node_modules/.prisma/client/schema.prisma' # <-------- this line
- 'node_modules/.prisma/client/libquery_engine-rhel-*'
This way only the src folder containing the lambda functions and the node_modules folder containing these two Prisma files were packaged and uploaded to AWS.
Although the use of serverless.package.include and serverless.package.exclude is deprecated in favor of serverless.package.patterns, this was the only way to get it to work.
An option is to use webpack with the copy-webpack-plugin and change the structure of your application, put all handlers inside the handlers folder.
Folders structure:
.
├── handlers/
│ ├── hello.ts
│ └── ...
└── services/
├── hello.ts
└── ...
webpack.config.js:
/* eslint-disable #typescript-eslint/no-var-requires */
const path = require("path");
// const nodeExternals = require("webpack-node-externals");
const CopyPlugin = require("copy-webpack-plugin");
const slsw = require("serverless-webpack");
const { isLocal } = slsw.lib.webpack;
module.exports = {
target: "node",
stats: "normal",
entry: slsw.lib.entries,
// externals: [nodeExternals()],
mode: isLocal ? "development" : "production",
optimization: { concatenateModules: false },
resolve: { extensions: [".js", ".ts"] },
output: {
libraryTarget: "commonjs",
filename: "[name].js",
path: path.resolve(__dirname, ".webpack"),
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
exclude: /node_modules/,
},
],
},
plugins: [
new CopyPlugin({
patterns: [
{
from: "./prisma/schema.prisma",
to: "handlers/schema.prisma",
},
{
from: "./node_modules/.prisma/client/libquery_engine-rhel-openssl-1.0.x.so.node",
to: "handlers/libquery_engine-rhel-openssl-1.0.x.so.node",
},
],
}),
],
};
If you need to run the npx prisma generate before assembling the package you can use the plugin serverless-scriptable-plugin (put before webpack):
plugins:
- serverless-scriptable-plugin
- serverless-webpack
custom:
scriptable:
hooks:
before:package:createDeploymentArtifacts: npx prisma generate
webpack:
includeModules: false
Dependences:
npm install -D webpack serverless-webpack webpack-node-externals copy-webpack-plugin serverless-scriptable-plugin

pnpm run on multiples projects based on location

I work within a pnpm workspace that contains some shared libraries, some front apps and some back apps. Schematically:
├── apps-front
│ ├── f1
│ └── f2
├── apps-back
│ ├── b1
│ └── b2
├── packages
│ ├── shared-common
│ └── shared-front
└── package.json
I'd like to run pnpm scripts on a subset of the packages. For example, when I'm working on the front apps, I'd like to enable "watch" for both shared and both front apps, but not the back. Typically, shared react components are built in real conditions and code changes can occur on either side.
All these packages contains a "dev" script that watch for changes and compile. Theses script are by nature, blocking and must run in parallel.
According the pnpm documentation, the run command is expected to accept workspace and filter parameters.
Here's what I tried :
pnpm run serve -r --parallel --filter {apps-front} --filter {packages}
But it fails with this error : pnpm.CMD: The command parameter was already specified.
How to fix the command ?
PS: if it matters, pnpm is 6.23.6, node is 14.8 and I'm on W10 21H2 X64
Actually, it was due to powershell terminal. Enclosing filters with " solved the issue:
pnpm run serve --stream --parallel --filter "{apps-front}" --filter "{packages}"
I guess the brackets wasn't interpreted literally.
I also removed the -r (recursive option) and added the --stream.
This works well also in the workspace package.json as a script:
{
"scripts": {
"devfront" : "pnpm run serve --stream​ --parallel --filter \"{apps-front}\" --filter \"{packages}\""
}
}

How to properly deploy a Vue + Apollo Server & Client app on Heroku?

I am new and have just been trying out Vue.js with Graphql. After some learning, I went and scaffold a project with vue ui(vue cli 3), added vue-cli-plugin-apollo for both the client and server so my current project structure is as follow:
Project Folder
─┬── apollo-server (server folder)
├── node_modules
├── public
├─┬ src (client folder)
│ └┬─ assets
│ ├─ components
│ ├─ graphql
│ ├─ views
│ ├─ App.vue
│ ├─ main.js
│ ├─ router.js
│ ├─ store.js
│ └─ vue-apollo.js
├── .env
├── package.json
└── vue.config.js
Package.json
{
"name": "vue-apollo-graphql",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"apollo": "vue-cli-service apollo:watch --run \"vue-cli-service serve\"",
"apollo:run": "vue-cli-service apollo:run"
},
"dependencies": {
"graphql-import": "^0.7.1",
"graphql-type-json": "^0.2.1",
"lowdb": "^1.0.0",
"merge-graphql-schemas": "^1.5.8",
"mkdirp": "^0.5.1",
"shortid": "^2.2.8",
"vue": "^2.5.17",
"vue-apollo": "^3.0.0-beta.11",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
},
"devDependencies": {
"#vue/cli-plugin-babel": "^3.0.1",
"#vue/cli-plugin-eslint": "^3.0.1",
"#vue/cli-service": "^3.0.1",
"#vue/eslint-config-prettier": "^4.0.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.8.0",
"eslint-plugin-graphql": "^2.1.1",
"eslint-plugin-vue": "^5.0.0-0",
"graphql-tag": "^2.9.0",
"vue-cli-plugin-apollo": "^0.18.0",
"vue-template-compiler": "^2.5.17"
}
}
On local development, npm run apollo works for the the app in localhost:8080(client) & localhost:4000/graphql
So my question is: How do I deploy them together on heroku? I have tried searching through the web and information are fragmented and don't make much sense to me. Can anyone give a clearer direction to help me tackle this problem so I can learn and understand more about it.
I also ran into this issue, and this is how I've managed it to work.
Go to https://www.apollographql.com/docs/apollo-server/essentials/server.html#middleware and see the section "Middleware". They say that you can add an Apollo Server as a middleware to existing Express server. So, you should install the package apollo-server-express and import ApolloServer from it. Then start your Express server and Apollo Server will be on path-to-your-server/graphql.
Then you should build your Vue app and specify your path to GraphQL server as a link to your Heroku app plus /graphql (I did it through .env file).
Deploy to Heroku and that's all! It took me around 10 minutes.
Also, you can see my source code here
https://github.com/kravchenkoegor/fullstack-vue-graphql/blob/master/src/server.js

Could not download http://nodejs.org/dist/v0.12.13/node-v0.12.13-darwin-x64.tar.g

I'm getting this error trying to build Zeppelin 0.6. on OS X 10.11.6
ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.25:install-node-and-npm (install node and npm) on project zeppelin-web: Could not download Node.js: Could not download http://nodejs.org/dist/v0.12.13/node-v0.12.13-darwin-x64.tar.gz: Connect to localhost:3128 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused -> [Help 1]
Node.js:
David-Laxers-MacBook-Pro:zeppelin davidlaxer$ npm -version
2.15.8
Maven:
David-Laxers-MacBook-Pro:zeppelin davidlaxer$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /opt/local/share/java/maven3
Java version: 1.8.0_05, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.6", arch: "x86_64", family: "mac
I can manually run the npm command that is failing from the zeppelin/zeppelin-web subdirectory as root:
$ sudo npm install --color=false --proxy=http://localhost:3128
Password:
npm WARN package.json zeppelin-web#0.0.0 No license field.
npm WARN engine karma#0.12.37: wanted: {"node":">=0.8 <=0.12 || >=1 <=2"} (current: {"node":"4.4.7","npm":"2.15.8"})
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated tough-cookie#2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated graceful-fs#2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated CSSselect#0.7.0: the module is now available as 'css-select'
> fsevents#1.0.14 install /Users/davidlaxer/zeppelin/zeppelin-web/node_modules/karma/node_modules/chokidar/node_modules/fsevents
> node-pre-gyp install --fallback-to-build
[fsevents] Success: "/Users/davidlaxer/zeppelin/zeppelin-web/node_modules/karma/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm WARN deprecated CSSwhat#0.4.7: the module is now available as 'css-what'
> ws#0.4.32 install /Users/davidlaxer/zeppelin/zeppelin-web/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
npm WARN cannot run in wd phantomjs#1.9.20 node install.js (wd=/Users/davidlaxer/zeppelin/zeppelin-web/node_modules/karma-phantomjs-launcher/node_modules/phantomjs)
grunt-contrib-copy#0.5.0 node_modules/grunt-contrib-copy
karma-jasmine#0.1.6 node_modules/karma-jasmine
grunt-cache-bust#1.3.0 node_modules/grunt-cache-bust
grunt-newer#0.7.0 node_modules/grunt-newer
├── async#0.2.10
└── rimraf#2.2.6
grunt-contrib-clean#0.5.0 node_modules/grunt-contrib-clean
└── rimraf#2.2.8
grunt-karma#0.8.3 node_modules/grunt-karma
└── lodash#2.4.2
bower#1.7.2 node_modules/bower
└── semver-utils#1.1.1
jshint-stylish#0.2.0 node_modules/jshint-stylish
├── text-table#0.2.0
└── chalk#0.4.0 (has-color#0.1.7, ansi-styles#1.0.0, strip-ansi#0.1.1)
time-grunt#0.3.2 node_modules/time-grunt
├── date-time#0.1.1
├── pretty-ms#0.1.0
├── hooker#0.2.3
├── text-table#0.2.0
└── chalk#0.4.0 (has-color#0.1.7, ansi-styles#1.0.0, strip-ansi#0.1.1)
grunt-filerev#0.2.1 node_modules/grunt-filerev
├── each-async#0.1.3
└── chalk#0.4.0 (ansi-styles#1.0.0, has-color#0.1.7, strip-ansi#0.1.1)
grunt-contrib-concat#0.4.0 node_modules/grunt-contrib-concat
└── chalk#0.4.0 (ansi-styles#1.0.0, has-color#0.1.7, strip-ansi#0.1.1)
grunt-concurrent#0.5.0 node_modules/grunt-concurrent
├── async#0.2.10
└── pad-stdio#0.1.1 (lpad#0.2.1)
load-grunt-tasks#0.4.0 node_modules/load-grunt-tasks
├── multimatch#0.1.0 (lodash#2.4.2, minimatch#0.2.14)
└── findup-sync#0.1.3 (lodash#2.4.2, glob#3.2.11)
grunt-cli#0.1.13 node_modules/grunt-cli
├── resolve#0.3.1
├── nopt#1.0.10 (abbrev#1.0.9)
└── findup-sync#0.1.3 (lodash#2.4.2, glob#3.2.11)
grunt-usemin#2.6.2 node_modules/grunt-usemin
├── lodash#2.4.2
├── debug#2.1.3 (ms#0.7.0)
└── chalk#0.5.1 (ansi-styles#1.1.0, escape-string-regexp#1.0.5, supports-color#0.2.0, strip-ansi#0.3.0, has-ansi#0.1.0)
autoprefixer#6.4.0 node_modules/autoprefixer
├── normalize-range#0.1.2
├── num2fraction#1.2.2
├── postcss-value-parser#3.3.0
├── browserslist#1.3.5
├── caniuse-db#1.0.30000518
└── postcss#5.1.2 (js-base64#2.1.9, source-map#0.5.6, supports-color#3.1.2)
grunt-postcss#0.7.2 node_modules/grunt-postcss
├── es6-promise#3.2.1
├── diff#2.2.3
├── chalk#1.1.3 (escape-string-regexp#1.0.5, supports-color#2.0.0, ansi-styles#2.2.1, has-ansi#2.0.0, strip-ansi#3.0.1)
└── postcss#5.1.2 (js-base64#2.1.9, source-map#0.5.6, supports-color#3.1.2)
grunt#0.4.5 node_modules/grunt
├── eventemitter2#0.4.14
├── dateformat#1.0.2-1.2.3
├── which#1.0.9
├── async#0.1.22
├── colors#0.6.2
├── getobject#0.1.0
├── lodash#0.9.2
├── rimraf#2.2.8
├── hooker#0.2.3
├── grunt-legacy-util#0.2.0
├── exit#0.1.2
├── coffee-script#1.3.3
├── iconv-lite#0.2.11
├── underscore.string#2.2.1
├── nopt#1.0.10 (abbrev#1.0.9)
├── glob#3.1.21 (inherits#1.0.2, graceful-fs#1.2.3)
├── minimatch#0.2.14 (sigmund#1.0.1, lru-cache#2.7.3)
├── findup-sync#0.1.3 (lodash#2.4.2, glob#3.2.11)
├── grunt-legacy-log#0.1.3 (grunt-legacy-log-utils#0.1.1, lodash#2.4.2, underscore.string#2.3.3)
└── js-yaml#2.0.5 (esprima#1.0.4, argparse#0.1.16)
grunt-svgmin#0.4.0 node_modules/grunt-svgmin
├── each-async#0.1.3
├── pretty-bytes#0.1.2
├── chalk#0.4.0 (has-color#0.1.7, ansi-styles#1.0.0, strip-ansi#0.1.1)
└── svgo#0.4.5 (colors#0.6.2, whet.extend#0.9.9, sax#0.6.1, coa#0.4.1, js-yaml#2.1.3)
grunt-contrib-connect#0.7.1 node_modules/grunt-contrib-connect
├── async#0.2.10
├── connect-livereload#0.3.2
├── open#0.0.4
├── portscanner#0.2.2 (async#0.1.15)
└── connect#2.13.1 (uid2#0.0.3, methods#0.1.0, debug#0.8.1, qs#0.6.6, pause#0.0.1, fresh#0.2.0, cookie-signature#1.0.1, raw-body#1.1.3, buffer-crc32#0.2.1, bytes#0.2.1, batch#0.5.0, compressible#1.0.0, cookie#0.1.0, negotiator#0.3.0, send#0.1.4, multiparty#2.2.0)
grunt-ng-annotate#0.10.0 node_modules/grunt-ng-annotate
├── ng-annotate#0.15.4 (tryor#0.1.2, stringset#0.2.1, stringmap#0.2.2, simple-fmt#0.1.0, simple-is#0.2.0, alter#0.2.0, stable#0.1.5, convert-source-map#0.4.1, optimist#0.6.1, source-map#0.1.43, acorn#0.11.0, ordered-ast-traverse#1.1.1)
└── lodash.clonedeep#3.0.2 (lodash._bindcallback#3.0.1, lodash._baseclone#3.3.0)
grunt-contrib-watch#0.6.1 node_modules/grunt-contrib-watch
├── async#0.2.10
├── lodash#2.4.2
├── tiny-lr-fork#0.0.5 (debug#0.7.4, qs#0.5.6, faye-websocket#0.4.4, noptify#0.0.3)
└── gaze#0.5.2 (globule#0.1.0)
grunt-angular-templates#0.5.9 node_modules/grunt-angular-templates
└── html-minifier#0.6.9 (relateurl#0.2.7, clean-css#2.2.23, change-case#2.1.6, cli#0.6.6, uglify-js#2.4.24)
grunt-contrib-htmlmin#0.3.0 node_modules/grunt-contrib-htmlmin
├── pretty-bytes#0.1.2
├── chalk#0.4.0 (has-color#0.1.7, ansi-styles#1.0.0, strip-ansi#0.1.1)
└── html-minifier#0.6.9 (relateurl#0.2.7, clean-css#2.2.23, change-case#2.1.6, cli#0.6.6, uglify-js#2.4.24)
grunt-goog-webfont-dl#0.1.2 node_modules/grunt-goog-webfont-dl
├── lodash#3.10.1
└── goog-webfont-dl#0.1.1 (commander#2.6.0, async#0.9.2, lodash#3.1.0, css#2.1.0, request#2.53.0)
grunt-contrib-cssmin#0.9.0 node_modules/grunt-contrib-cssmin
├── chalk#0.4.0 (has-color#0.1.7, ansi-styles#1.0.0, strip-ansi#0.1.1)
├── clean-css#2.1.8 (commander#2.1.0)
└── maxmin#0.1.0 (pretty-bytes#0.1.2, gzip-size#0.1.1)
grunt-wiredep#2.0.0 node_modules/grunt-wiredep
└── wiredep#2.2.2 (propprop#0.3.1, minimist#1.2.0, lodash#2.4.2, chalk#0.5.1, through2#0.6.5, bower-config#0.5.2, glob#4.5.3)
grunt-dom-munger#3.4.0 node_modules/grunt-dom-munger
└── cheerio#0.12.4 (entities#0.5.0, underscore#1.4.4, htmlparser2#3.1.4, cheerio-select#0.0.3)
grunt-contrib-jshint#0.10.0 node_modules/grunt-contrib-jshint
├── hooker#0.2.3
└── jshint#2.5.11 (underscore#1.6.0, strip-json-comments#1.0.4, exit#0.1.2, minimatch#1.0.0, shelljs#0.3.0, console-browserify#1.1.0, cli#0.6.6, htmlparser2#3.8.3)
karma-phantomjs-launcher#0.1.4 node_modules/karma-phantomjs-launcher
└── phantomjs#1.9.20 (progress#1.1.8, kew#0.7.0, which#1.2.10, request-progress#2.0.1, hasha#2.2.0, extract-zip#1.5.0, fs-extra#0.26.7, request#2.67.0)
grunt-contrib-uglify#0.4.1 node_modules/grunt-contrib-uglify
├── chalk#0.4.0 (ansi-styles#1.0.0, has-color#0.1.7, strip-ansi#0.1.1)
├── maxmin#0.1.0 (pretty-bytes#0.1.2, gzip-size#0.1.1)
└── uglify-js#2.7.0 (async#0.2.10, uglify-to-browserify#1.0.2, source-map#0.5.6, yargs#3.10.0)
karma#0.12.37 node_modules/karma
├── di#0.0.1
├── q#1.4.1
├── mime#1.3.4
├── graceful-fs#3.0.8
├── colors#1.1.2
├── lodash#3.10.1
├── useragent#2.1.9 (lru-cache#2.2.4)
├── source-map#0.4.4 (amdefine#1.0.0)
├── optimist#0.6.1 (wordwrap#0.0.3, minimist#0.0.10)
├── minimatch#2.0.10 (brace-expansion#1.1.6)
├── glob#5.0.15 (path-is-absolute#1.0.0, inherits#2.0.1, inflight#1.0.5, once#1.3.3)
├── rimraf#2.5.4 (glob#7.0.5)
├── log4js#0.6.38 (semver#4.3.6, readable-stream#1.0.34)
├── http-proxy#0.10.4 (colors#0.6.2, pkginfo#0.3.1, utile#0.2.1)
├── socket.io#0.9.16 (base64id#0.1.0, policyfile#0.0.4, redis#0.7.3, socket.io-client#0.9.16)
├── connect#2.30.2 (cookie#0.1.3, bytes#2.1.0, cookie-signature#1.0.6, utils-merge#1.0.0, on-headers#1.0.1, pause#0.1.0, content-type#1.0.2, fresh#0.3.0, parseurl#1.3.1, vhost#3.0.2, response-time#2.3.1, basic-auth-connect#1.0.0, cookie-parser#1.3.5, depd#1.0.1, qs#4.0.0, connect-timeout#1.6.2, debug#2.2.0, method-override#2.3.6, serve-favicon#2.3.0, http-errors#1.3.1, multiparty#3.3.2, type-is#1.6.13, finalhandler#0.4.0, morgan#1.6.1, express-session#1.11.3, serve-static#1.10.3, serve-index#1.7.3, errorhandler#1.4.3, compression#1.5.2, body-parser#1.13.3, csurf#1.8.3)
└── chokidar#1.6.0 (path-is-absolute#1.0.0, inherits#2.0.1, glob-parent#2.0.0, async-each#1.0.0, is-binary-path#1.0.1, is-glob#2.0.1, fsevents#1.0.14, readdirp#2.1.0, anymatch#1.3.0)
karma-coverage#0.5.5 node_modules/karma-coverage
├── source-map#0.5.6
├── minimatch#3.0.2 (brace-expansion#1.1.6)
├── dateformat#1.0.12 (get-stdin#4.0.1, meow#3.7.0)
└── istanbul#0.4.4 (abbrev#1.0.9, async#1.5.2, wordwrap#1.0.0, nopt#3.0.6, esprima#2.7.2, mkdirp#0.5.1, resolve#1.1.7, which#1.2.10, once#1.3.3, supports-color#3.1.2, js-yaml#3.6.1, escodegen#1.8.1, fileset#0.2.1, handlebars#4.0.5)
But the mvn command fails:
[INFO] Downloading Node.js from http://nodejs.org/dist/v0.12.13/node-v0.12.13-darwin-x64.tar.gz to /Users/davidlaxer/zeppelin/zeppelin-web/node_tmp/node.tar.gz
[INFO] Downloading via proxy proxy-http{protocol='http', host='localhost', port=3128}
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Zeppelin: web Application .......................... FAILURE [ 3.336 s]
[INFO] Zeppelin: Server ................................... SKIPPED
[INFO] Zeppelin: Packaging distribution ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.025 s
[INFO] Finished at: 2016-08-07T00:02:45-07:00
[INFO] Final Memory: 23M/115M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "spark-2.0" could not be activated because it does not exist.
[WARNING] The requested profile "hadoop-2.6" could not be activated because it does not exist.
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.25:install-node-and-npm (install node and npm) on project zeppelin-web: Could not download Node.js: Could not download http://nodejs.org/dist/v0.12.13/node-v0.12.13-darwin-x64.tar.gz: Connect to localhost:3128 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I tried following the proxy adjustments listed on the github Zeppelin repository:
Proxy settings (optional)
First of all, set your proxy configuration on Maven settings.xml.
<settings>
<proxies>
<proxy>
<id>proxy-http</id>
<active>true</active>
<protocol>http</protocol>
<host>localhost</host>
<port>3128</port>
<!-- <username>usr</username>
<password>pwd</password> -->
<nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
</proxy>
<proxy>
<id>proxy-https</id>
<active>true</active>
<protocol>https</protocol>
<host>localhost</host>
<port>3128</port>
<!-- <username>usr</username>
<password>pwd</password> -->
<nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
</settings>
Then, run these commands from shell.
npm config set proxy http://localhost:3128
npm config set https-proxy http://localhost:3128
npm config set registry "http://registry.npmjs.org/"
npm config set strict-ssl false
git config --global http.proxy http://localhost:3128
git config --global https.proxy http://localhost:3128
git config --global url."http://".insteadOf git://
Cleanup: set active false in Maven settings.xml and run these commands.
npm config rm proxy
npm config rm https-proxy
git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global --unset url."http://".insteadOf
Any ideas?
I forgot to set 'active' to false in ~/.m2/settings.xml before running:
Cleanup: set active false in Maven settings.xml and run these commands.
npm config rm proxy
npm config rm https-proxy
git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global --unset url."http://".insteadOf

Brunch is not compiling a SASS file with sass-brunch

I am building a project using SASS, CoffeeScript, Jade and Brunch. Everything works perfectly, except that my application.sass is not compiling.
Here is my brunch config.coffee
exports.config =
modules:
definition: false
wrapper: false
conventions:
assets: /^app\/views/
files:
javascripts: joinTo:
'app.js': /^app\/scripts\/.*/
'index.js': /^app\/scripts\/index\.coffee/
stylesheets: joinTo:
'app.css': /^app\/styles\/application\.sass/
my node package.json
{
"name": "disynr",
"version": "0.0.0",
"description": "Website builder",
"main": "public/index.html",
"devDependencies": {
"brunch": "^1.8.5",
"coffee-script-brunch": "^1.8.2",
"javascript-brunch": "^1.7.1",
"sass-brunch": "^1.8.11",
"watch": "^0.16.0"
},
"author": "Samadi van Koten",
"license": "MIT",
"dependencies": {
"jade": "^1.11.0"
}
}
Contents of application.sass
body
font-family: Helvetica,Arial,sans-serif
and the output from tree app
app
├── scripts
│   ├── _helpers.js
│   ├── helpers.coffee
│   └── index.coffee
├── styles
│   └── application.sass
└── views
├── head.jade
├── index.html
└── ui.jade
3 directories, 7 files
Output of brunch b -d 2>&1 | grep application:
Mon, 14 Sep 2015 20:32:31 GMT brunch:file-list Reading 'app/styles/application.sass'
Mon, 14 Sep 2015 20:32:31 GMT brunch:watch File 'app/styles/application.sass' received event 'add'
The file public/app.css which should be built by Brunch, does not exist after running brunch build or brunch watch.
I am using Mac OS X Yosemite. If any more information is required, please post a comment.
The sass-brunch plugin previously required the ruby gem to process the .sass syntax. Now that support has been added to libsass, the native extension sass compiler, sass-brunch v1.9+ does as well.
To resolve the issue:
npm install sass-brunch#1.9 --save

Resources