can I run the hello.js example for spookyjs on nitrous.io? - nitrousio

Here are the exact steps I took to try to run the hello.js example for spooky js on nitrous.
1. I installed phantomjs, nodejs(already installed), and casperjs.
$ npm install -g casperjs
Casper warns me that While CasperJS is installable via npm, it’s not a NodeJS package, neither it’s capable to require native NodeJS modules.
Because of this I wanted to use spookyjs which is a nodejs package.
Then, I installed phantom js: $ npm install phantomjs
Finally, I installed spookyjs: $ npm install spooky
2. I tried running the hello.js example using
$ node node_modules/spooky/examples/hello.js
3. I end up getting this error:
{ [Error: Child terminated with non-zero exit code 1] details: { code: 1, signal: null }}
Am I doing something wrong or can casperjs not be installed?
this is where I found spookyjs

Have you installed the phantomjs and casperjs runtime? The npm packages for phantomjs and casperjs call out to these runtimes. The error you see is when it can not find the casperjs runtime.
I'm not very familiar with nitrous.io and how much freedom you have to install other runtimes. Here's what I used for installing them on Linux: https://www.dvdheiden.nl/2013/07/30/installing-phantomjs-and-casperjs-on-linux/

Related

node-gyp configure "binding.gyp not found (cwd: D:\MyProject) while trying to load binding.gyp"

I searched many and installed all necessary packages they said,
npm install --global --production windows-build-tools
node-gyp --python /path/to/python2.7
I have vs2017 installed in my win10 pc, I am using last versions of nodes tools
node -v //8.12.0
npm -v //6.4.1
I tried remove nodejs and reinstall to start fresh install but stuck in this step each,
here my .npmrc content;
strict-ssl=false
node_gyp=node C:\Users\ASUS\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js
msvs_version=2015
python=C:\Python27\python.exe
GYP_MSVS_VERSION=2015
ss of powershell, (node-gyp configure)
it looks for a file called 'binding.pyp'
If I add that file manually errormessage changes.. but other examples dont create any file they just install packges and run..
How can I fix this I searched on net many and did all advices(install ms build tools set msvs version 2017)

Compiling assests in laravel

While compiling assests in laravel using npn run dev I am getting the following error.
its happen in new version of npm just type
npm install express
than you can use npm install
if you getting this error again type again
npm install express
or you can use npm run watch

Electron cannot find module mysql

So i've been creating a desktop application using electron. The problem is that when I run my application using npm it doesn't show any error about a missing module but when i package it and run it this error shows
I'm sure that i've install mysql module using npm install -g mysql and npm install mysql in the project directory. It's all working fine when i run the unpacked version of the application
Assuming that you have installed mysql if not please install mysql npm install mysql --save-dev
Hi I also ran in same error I tried everything possible but nothing seems to work , after several hit and trial I was able to fix it and in the end realize that it was all happening because of
When I installed MySQL module I never saved it (--save-dev)
And electron-packager was not able to locate it when I pack it because was not mention in package.json
A solution might locate mysql folder in node_module folder and delete
then install it npm install mysql --save-dev
or manually
add it under dependencies in package.json file

Error: Requiring external module babel-register

sw_vers && node -e 'console.log(process.platform, process.versions)'
ProductName: Mac OS X
ProductVersion: 10.11.3
BuildVersion: 15D21
darwin { http_parser: '2.6.0',
node: '5.2.0',
v8: '4.6.85.31',
uv: '1.7.5',
zlib: '1.2.8',
ares: '1.10.1-DEV',
icu: '56.1',
modules: '47',
openssl: '1.0.2e' }
node -v
v5.2.0
gulp -v
Requiring external module babel-register
CLI version 3.9.1
Local version 3.9.1
Getting error when running gulp serve, I've fixed this before by removing the entire webapp repo from local. Any and all help/advice appreciated, also please forgive if I've not formatted this issue as correctly as possible(first issue ever opened). Would like to resolve this without having to do this. gulp serve throws the following:
Running yeoman generator "Webapp", I'm getting an error when running gulp serve. Here are the following versions for a better background :
sw_vers && node -e 'console.log(process.platform, process.versions)'
ProductName: Mac OS X
ProductVersion: 10.11.3
BuildVersion: 15D21
darwin { http_parser: '2.6.0',
node: '5.2.0',
v8: '4.6.85.31',
uv: '1.7.5',
zlib: '1.2.8',
ares: '1.10.1-DEV',
icu: '56.1',
modules: '47',
openssl: '1.0.2e' }
node -v
v5.2.0
gulp -v
Requiring external module babel-register
CLI version 3.9.1
Local version 3.9.1
Finally the gulp serve error:
gulp serve
Requiring external module babel-register
\node_modules/babel-core/lib/transformation/file/options/option-manager.js:372
throw new Error("Couldn't find preset " + JSON.stringify(val) + " relative to directory " + JSON.stringify(dirname));
Does anybody have any idea what the problem could be, any suggestions?
Here's what I've tried:
npm uninstall gulp
npm install gulp
//with global flag and not
npm install --save-dev gulp
//installing babel-register manually w/wo global flag and --save-dev
npm install babel-register
npm cache clean
I had a very similar issue with running a custom project that was originally created using the Yeoman Webapp generator and found a solution that worked for me. A bit of context... the project was running fine on my Windows 7 machine and when I tried to move it over to my Mac OSX machine I received the exact same error. What I found works is creating a new Yeoman Web App project and drag & dropping the exact node-modules folder structure over to your existing project. Most likely than not, there is a dev dependency that your machine is not reading and fetching accurately, in this case, the babel-register module which is contained within this node-modules folder.
If possible for you to do, it's also worth comparing the versions of node, npm, gulp, gulp cli with your previous working version and the version you are having trouble loading when running gulp serve to see if they match.

Azure Website Instance not running defined Node Version in Package.json

Currently in Azure I am utilizing a 'Azure Website' instance to try and run Docpad (NodeJS App). Within my package.json file I have the following defined..
"engines": {
"node": "0.10.21",
"npm": "1.x"
},
I have tried numerous different entries, from 0.10.x to 0.8.x all listed here => http://azure.microsoft.com/en-us/documentation/articles/nodejs-specify-node-version-azure-apps/
The problem is that Docpad is using Dependencies with Semver Entries and Azure seems to be ignoring my defined Node version entirely, as there are errors such as...
npm WARN engine docpad#6.69.2: wanted: {"node":">=0.8","npm":">=1.2"} (current: {"node":"0.6.20","npm":"1.1.37"})
Because of this, I am getting critical/failure errors when NPM goes to install Docpad due to dependencies such as this...
npm ERR! Error: No compatible version found: rimraf#'^2.2.8'
npm ERR! Valid install targets:
npm ERR! ["1.0.0","1.0.1","1.0.2","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9","2.0.0","2.0.1","2.0.2","2.0.3","2.1.0","2.1.1","2.1.2","2.1.3","2.1.4","2.2.0","2.2.1","2.2.2","2.2.3","2.2.4","2.2.5","2.2.6","2.2.8"]
I have even gone as far as to try printing the Node Version in my deployment script, only to have it return the Environment Variable Azure supposedly honors, but it is clearly invalid.
All I am trying to do is deploy a Docpad website on Azure and I am dumbfounded as to how this is so difficult to to just use a semi-recent version of node in Azure. Any help at all would be greatly appreciated!
node and npm are now npm packages that can be installed as dependencies of your project, so it will run with the correct versions once its dependencies are installed.
However, to install those packages you will need to start with newer versions than the ones you have in your engines section:
Without npm >= 3 installing the node package will break your system by removing the existing version of node too soon
Without node >= 4 the npm package won't work (it isn't specific as to what goes wrong)