Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I know this message might sound stupid.
But I'm trying to play around a bit with the Svelte Compiler from GitHub https://github.com/sveltejs/svelte. I cloned and installed everything just like in the Instructions. But how can I now use the compiler to run a Project I programmed in Svelte?
You can use a local version of a project in another project with npm link.
In the case of Svelte, you also need to ensure that you rebuild after any change (to Svelte). You can generally find the build script in the scripts section of package.json. For Svelte, it's npm run build, or npm run dev to watch & rebuild as you change.
git clone git#github.com:sveltejs/svelte.git svelte
cd svelte
npm install
npm link
npm run dev # watch & rebuild
In another terminal:
npx degit sveltejs/template my-app
cd my-app
npm install
npm link svelte # <--------- here
ls -l node_modules | grep svelte # confirm svelte is a symlink
npm run dev
You would have to link the local version of your repositories:
In the Svelte repository:
npm link
In the project repository:
npm link svelte
(this should give some feedback where you see you are linking to a local version)
This should setup your project to use the local version of Svelte
https://docs.npmjs.com/cli/link.html
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I am trying to download and install an app called "code printer" from Github but there seems to be no setup. I have installed the Git app on my Windows computer and it has been configured with my username and email ID. I have downloaded the files to my computer from the website. I am unsure about how to proceed. I am new to github and a step by step procedure would greatly help. Thank you.
This is the url where the app can be found : https://github.com/jaredpetersen/codeprinter
On each Github projects, developers often leave a README.md file in the root of their repository to give more details about their project. This is the case for that one: https://github.com/jaredpetersen/codeprinter/blob/master/README.md
In 90% of the time, they offer installation instruction on how to build and install their project on your own computer. Code Printer, for example, seems to have this section in particular. They even have a ready to use hosted version there: http://jaredpetersen.github.io/codeprinter/.
In the "Usage" section, there is two key important things to note. The first one, the technology used to develop this software, which is Node.js, then it is followed by the list of command lines to run under a command prompt in order to build and run the software. Node.js includes, once installed on your computer, npm, the Node.js package manager. This package manager is necessary to build and run the software.
So in short:
Download & install Node.js: https://nodejs.org/en/. If you have the
Chocolatey package manager on your computer, you can alternatively
install it with the command "choco install nodejs-lts".
Open a command prompt and then navigate to the project's folder on your computer. Be sure to open it after the installation of Node.js.
You can test if the installation is successful by typing "npm" then
enter to see if npm respond to the command. If not, maybe your path
environment variable isn't pointing to the executable. Just make sure
it is.
Type
npm install
npm run build
npm start
in the command prompt
Enjoy!
If something is still unclear, simply leave a comment and I will add more details in this answer.
The instructions are on the page you linked to
npm install
npm run build
npm start
You will need to have Node.JS installed for npm to work.
I am not a developer, but I had an app built a couple months ago. The developer we had won't help us at all anymore (not sure why).
Please excuse me if I don't use proper terms.
So the project was done on Expo. I no longer have access to the original expo project, but I have all the code he wrote in a Github repository.
Is is possible to take the code from Github and paste it into Expo XDE and possibly reproduce the app on Expo? (Or Does that sound possible?)
Please let me know.
Yes, you could do this. It is important, that you copy all project files from the GitHub repository into your new Expo project. Don't forget to download all necessary libraries into your new Expo project, e.g. via npm install.
I'm a complete react native noob, I've been doing this, and I love it:
Develop prototype on https://snack.expo.io
Here I can develop and test on the browser, test on my phones, and on emulators. It's great.
When I'm ready to build, I download the code package from the Snack IDE
This downloads a zip file with everything except Expo and imported libraries.
I unzip and go into the folder with my terminal and install the libraries.
Inside the folder, I run these commands to install Expo and the regular libraries:
$ npm install expo # install expo
$ npm install # install a bunch of required libraries
# Then I run these two lines until my project builds
$ npm run web # try to run - it will tell me which libraries to install, one by one
$ npm install <library> # install each library
Eventually I'll move to using command-line only, but this is both a no-brainer for a noob like me and it's like training wheels for me to learn npm and expo.
We are about to close a SAPUI5 application, one of the last steps is to make a Component-Preload.js file to improve performance. I read different guides around the web, all of them need Node.js that I have installed. I'm not expert about that package and I can't figure how to make one of that guides work. I'm developing with NetBeans. As far as I see there is not an official tool (am I right?) to generate that file. Can someone with more experience than me suggest a working, well-explained guide to perform that task?
I don't know if this could help, that's my working tree:
There are several main ways of doing it.
You can use SAP Web IDE to generate it. This assumes that you are using WebIDE to develop your application (which is not true based on your question). The regular version of WebIDE generates this file during the "client build" just before application deployment.
The "multi cloud" version of WebIDE can use a grunt build to do it. You can find more info here if you are interested: https://www.sap.com/developer/tutorials/webide-grunt-basic.html.
Use the new UI5 command line tools (https://npmjs.com/package/#ui5/cli):
Run npm i -g #ui5/cli to install the tools globally.
Open the root of your project with your terminal.
Run ui5 build preload to build the preload.
Use the #sap/grunt-sapui5-bestpractice-build pre-configured grunt tasks. The downside is that they are more-or-less black boxes which do not allow that much customisation. You can find an example setup on SAP's GitHub repository jenkins-pipelines. In a nutshell:
You need to define an .npmrc file which adds the #sap npm registry: #sap:registry=https://npm.sap.com.
Run a npm init command such that you generate a package.json file. This file describes your application and your dependencies (runtime dependencies and dev dependencies; you will only have dev dependencies for now, as you just want to build your app). Make sure to mark the package as private. See the npm docu (at the end of the license chapter).
Then you can install grunt and the build configuration: npm i grunt -D and npm i #sap/grunt-sapui5-bestpractice-build -D.
Lastly you need to define a simple Gruntfile (you can then run the build by just running grunt):
module.exports = function (grunt) {
'use strict';
grunt.loadNpmTasks('#sap/grunt-sapui5-bestpractice-build');
grunt.registerTask('default', [
'lint',
'clean',
'build'
]);
};
You can use the official grunt_openui5 plugin to generate the preload file(s). In order to be able to do this, you need to have node installed:
Create a package.json (e.g. through npm init).
Install grunt by writting in the console: npm install grunt-cli --save-dev.
Install the official openui5 grunt plugin: npm install grunt-openui5 --save-dev.
Now you have all the tools necessary, you just need to tell grunt what it has to do. You should create a Gruntfile.js in the root of your project. In this file you should configure the grunt openui5 task as described in the official github page (I linked it above). You can find a similar file here (it has more build steps like minification and copying the result files in a separate directory).
You can then run the grunt build by simply running grunt <task_name> in the console. If you registered your build task as the grunt default task (like in the sample file: grunt.registerTask('default', [...]);) then you just have to write grunt.
I think you should be able to integrate such a command line script (i.e. to run grunt) inside your IDE as an external tool.
You can use the unofficial gulp-openui5 tool to generate it. I would not recommend this if you are not already using gulp for your builds (as it is not a tool built by SAP). The procedure is the same, but using gulp for building the app instead of grunt (so you need to install node, npm init, install gulp, create the Gulpfile, etc).
Note that for most of the above methods, you need nodejs, which you can download and install from here: https://nodejs.org/en/download/.
Code
GitHub version: https://github.com/trevordmiller/generator-code-deck
npm version: https://www.npmjs.org/package/generator-code-deck
Background
I have built a Yeoman generator which is working perfectly locally (using npm link after cloning the repo from GitHub). However, when I npm publish the generator to npm and install it via npm install -g generator-code-deck, running the generator throws no such file or directory and cannot find module errors:
These errors don't make sense to me, because 1. the files and folders are obviously there (as shown by the screenshot doodles) and 2. the generator is working via a symbolic link to the local repo; why should the npm package be any different?
I have been searching online to find an answer but I can't find anything. Does anyone know why these errors are happening when trying to install via npm, but not via a symbolic link? Does anyone know how to fix this so that I can release the official npm version of the Yeoman generator? Any help would be much appreciated!
Chances are you're not publishing all files to npm.
This can be caused by a .npmignore file or by the files key of your package.json.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I need to install libmemcache onto a CentOS box. I don't have root privileges, so preferably everything would go somewhere inside my home directory.
I've tried downloading libmemcached-1.0.12.tar.gz and building it with ./configure --prefix=/home/charrison, make install, but this inscrutably failed. Something clued me to install libevent, which helped somewhat, but ultimately the libmemcached make is now failing as follows:
In file included from ./libmemcached/common.h:72,
from ./libmemcached/csl/common.h:40,
from libmemcached/csl/context.cc:38:
./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory
And, even if I resolved that, who knows how many more prerequisites exist?
Then it occurred to me "Hey, isn't this what 'package managers' are for? To know about and install prerequisites?" I discovered that RPM is the CentOS package manager, but I drowned in the man page. I'm not even sure whether it is capable of downloading packages or knowing about dependencies.
The only "package manager" I have any experience with is cpan, which is pretty powerful and simple.
So I'd really like to know
how to install libmemcached in CentOS privately, and if possible,
what a package manager does and does not do
Here is my answer to the two questions. Hope it helps you.
how to install libmemcached in CentOS privately, and if possible,
(Step 1) download libmemcached RPM package from CentOS mirror site such as ftp://ftp.riken.jp/Linux/centos/<centos version>/os/<your arch>/Packages/.
(Step 2) extract the package in a current directory by using rpm2cpio command.
e.g., $ mkdir foo; cd foo; rpm2cpio ../libmemcached-*.rpm | cpio -di
what a package manager does and does not do
rpm command allows you to find out what packages are installed(*1).
Also, you can confirm the dependencies among multiple packages(*2), what package the specified file belongs to(*3) and what files the specified package contains(*4).
(*1) e.g., $ rpm -qa
(*2) e.g., $ rpm -q --requires foo
(*3) e.g., $ rpm -qf /etc/foo.conf
(*4) e.g., $ rpm -ql foo
I think that Maximum RPM(http://www.rpm.org/max-rpm/) is very useful site for you.