errors when building zepto - zepto

when I try to build zepto I get the following error:
MODULES="zepto event polyfill detect fx fx_methods ajax form selector touch gesture" ./make dist
Error: Cannot find module 'shelljs/make'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/Users/kevin/etcgit/zepto/make:4:3)
at Object.<anonymous> (/Users/kevin/etcgit/zepto/make:153:4)
at Module._compile (module.js:449:26)
at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:124:25)
at compileScript (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:166:29)
at fs.stat.notSources.(anonymous function) (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:141:18)
at fs.readFile (fs.js:176:14)
at Object.oncomplete (fs.js:297:15)
not sure whats going on... I did install shell js but that didnt get rid of the error...

Make sure you run npm install first. So...
cd src/js/libs/zepto
npm install
MODULES="zepto event polyfill detect fx fx_methods ajax form selector touch gesture" ./make dist
From https://github.com/madrobby/zepto#building
I ran into the same problem myself...
Good luck,
Rob.

If you want to custom package,please open the file 'make' in the zepto root directoy and find the line 42.Then you will see:
modules = (env['MODULES'] || 'zepto event ajax form ie touch').split(' ')
Modify the package that split with space, after save it. Run the
npm run-script dist
In previous,you must have installed all the packages that depended on.

Related

firebase function https post - Error: Cannot find module 'request' problem

I am trying to do a https post in firebase function, and I tried to deploy the code below but it had problems with "request". I would like to know how to solve the issue below and do a https post.
Deployment error.
Function failed on loading user code. Error message: Code in file index.js can't be loaded.
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module 'request'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/srv/index.js:36:15)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
I have executed this on command line, but I dont see any request module in package.json
npm install --save request
The following is my firebase function code
https://gist.github.com/axilaris/378a4a3b344b22ed09d6ed6b1ec4b14f
If you don't see the request module in your package.json, that means you probably ran the npm command in the wrong folder. You should run it from your "functions" folder, where package.json lives.

Laravel elixir Sass error

I'm installing laravel elixir on my latest homestead machine , working on laravel 5.3, i followed the exact documentation to install laravel elixir, but it didn't worked , it's throwing error regarding sass file. here is snapshot
How do i solve this issue.
test version is ->
```
[19:33:15] Using gulpfile ~/sites/dev.friendsforever/server/gulpfile.js
[19:33:15] Starting 'all'...
[19:33:15] Starting 'sass'...
[19:33:16] 'sass' errored after 169 ms
[19:33:16] Error: ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:856:18)
at Object.getInstalledBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/extensions.js:119:13)
at foundBinariesList (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:45:5)
at Object.<anonymous> (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/index.js:15:28)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
[19:33:16] 'all' errored after 179 ms
[19:33:16] Error in plugin 'run-sequence(sass)'
Message:
ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
Details:
errno: -2
code: ENOENT
syscall: scandir
path: /home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor
Stack:
Error: ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:856:18)
at Object.getInstalledBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/extensions.js:119:13)
at foundBinariesList (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:45:5)
at Object.<anonymous> (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/index.js:15:28)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
```
image version is ->
the problem is the incompatibility between OS and node js, so the solution is just run the command npm rebuild node-sass.
Just run npm rebuild node-sass from within your Host computer. If you have node installed on your computer, it will rebuild node-sass, detect whatever environment your Host computer is, and do something specific to that node-sass build.
Then run gulp command, hope it will work.
If you haven't figured it out by now, you can run
npm install node-sass --no-bin-links
from within the virtual machine and then gulp should work.
If you are getting "Error: ENOENT: no such file or directory..." error run this command. It worked for me.
npm rebuild node-sass
Reference: https://laracasts.com/discuss/channels/elixir/laravel-53-gulp-error-cannot-find-module-laravel-elixir-vue-2

Building electron app fails with Electron packager and electron builder

First of all, I created a tag and build my app with electron-packager:
node_modules/.bin/electron-packager . MyApp --platform=win32 --arch=x64 --icon='/home/user/Desktop/logo.ico' --asar=true --prune --overwrite
It worked fine! The problem is that now, for this release, I create a new tag, but I try to build my app with electron builder instead. I get the following error:
A JavaScript error occurred in the main process Uncaught Exception:
Error: Unable to find a valid app at Object.<anonymous> (E:\Project\dist\win-unpacke
d\resources\electron.asar\browser\init.js:128:9) at Module._compile (module.js:541:3
2) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458
:32) at tryModuleLoad(module.js:417:12) at Function.Module._load (module.js:409:3) a
t Function.Module.runMain (module.js:575:10) at run (bootstrap_node.js:360:7) at sta
rtup (bootstrap_node.js:152:9) at bootstrap_node.js:497:3
Furthermore, I try to build my app again with electron packager, but it didn't work now! I get the same problem.
I checkout my app to the previoulsy working tag, and it neither work.
Unfortunately, the code can not be distributed
Thanks!
The problem was in my package.json.
I miss to add "package.json" file to my files field

How to make Yeoman work

I have got Yeoman installed and when I run the yo command I get this:
Error: EACCES, permission denied '/Users/Richard_Home/.config/configstore/insight-yo.yml'
You don't have access to this file.
at Object.fs.openSync (fs.js:427:18)
at Object.fs.writeFileSync (fs.js:966:15)
at Object.create.all.set (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:56:8)
at Object.Configstore (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:19:11)
at new Insight (/usr/local/lib/node_modules/yo/node_modules/insight/lib/insight.js:23:34)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/cli.js:23:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
[03:35:36] ~ $
I have tried adding this to my $path:
export PATH=/usr/local/bin/npm:$PATH
as that is where npm is.
When I do sudo yo install generator-webapp
I get this response:
A quick solution would be to change where npm stores global packages by
putting ~/npm/bin in your PATH and running:
npm config set prefix ~/npm
I have run npm config set prefix ~/npm
I still get the same error access denied.
I just want to run yo I have it installed on an iMac and it worked straight away. I am on a macBook.

Executing Bower in a CI Environment, such as Jenkins

My Jenkins is running on CentOS 6 with node.js 0.10.15 and bower 1.0.3.
I have a shell task which executes the following:
npm install
bower install
grunt clean package
The bower installation fails when building:
+ bower install
path.js:360
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at Object.<anonymous> (/usr/lib/node_modules/bower/node_modules/
update-notifier/node_modules/configstore/configstore.js:9:7)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
Build step 'Execute shell' marked build as failure
When I'm executing bower install in a terminal while logged in as the Jenkins user, it works. The other mentioned commands work as expected (npm, grunt).
Any ideas?
It appears that your execution environment has neither $XDG_CONFIG_HOME nor $HOME set as environment variables.
You can work around this by manually setting it, for example, to the current workspace:
export XDG_CONFIG_HOME="$WORKSPACE/.config"
...
bower install

Resources