Is there any solution to solve the error that node modules not installed in foundation-sites new project - node-modules

There were some problems during the installation.
✓ New project folder created.
✗ Node modules not installed. Try running yarn install manually.
Once you've resolved the above issues, run foundation watch while inside the app-page folder.

Related

gulp build through Gradle fails at install npm -failed for a project

We have gradle and npm installed on Linux box inside jenkins container where I am able to build through gulp build command but when I run
"gradle build"
Execution failed for task ':themes:portlet-layout:-portal-layouttpl:npmInstall'.
A problem occurred starting process 'command '/var/jenkins/workspace/Portal_RTC/liferay-workspace/build/node/node..
,I have got gradle npm installed and PATH set.I can say this running by npm --v , node --version.
I want to know what configuration I am missing to make it work.Also everytime I checked out the code I need to install modules again specially gulp else it start download from webhttp://mirrors.lax.liferay.com/nodejs.org/dist/v8.10.0/node-v8.10.0-linux-x64.tar.gz
when I define gradle-gulp plugin in build.gradle it says node is already installed. The imp things is the whole setup work on Developer machine on windows. Though they have copied node_modules folder from nodeJs home to their individual projects.
thanks

Yarn install has been replaced with `add`

On my Windows system I can run yarn install with no issue in my project. But during my Azure build which is running on Ubuntu-16.04 I get the following message:
error: install has been replaced with add to add new dependencies. Run "yarn add yarn build" instead.
Doing a yarn add gives this message:
error: Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).
In my project I have multiple applications all with their own package.json file. If I'm reading the message correctly the yarn add will add all the dependencies to the root file and not in the directories where the package.json files are located.
So how do install the packages per directory/package.json file using yarn add?
Initially I added: yarn add --cwd apps/<foldername>/<foldername> to the build script. You can do this for multiple folders to initiate different builds. But just running yarn from the root also resolved all the different builds.

Yarn install trigger all scripts in my package.json, it is normal?

The documentation doesn't mention this specifity:
yarn install is used to install all dependencies for a project. This
is most commonly used when you have just checked out code for a
project, or when another developer on the project has added a new
dependency that you need to pick up.
Yarn install : Install all the dependencies listed within package.json in the local node_modules folder.

Gulp didn't install on Laravel Homestead VM (from Windows) and no node_modules folder exists in the directory with package.json?

I got Laravel Homestead up and running, except when I issue this ssh command:
gulp
I get this error:
Local gulp not found in ~/projects/laravel
Try running: npm install gulp
That's when I noticed there was no node_modules folder at all in this directory. Weird. Is this an issue where the paths were too long for Windows when I did a vagrant up? Since the host machine for this VM is Windows and I'm sharing folders with my VM (actually I'm not, but rather I'm using phpStorm's sync so that pages will load faster on the VM), when I do a npm install am I still going to encounter the problem? Hmm...I guess Taylor Otwell is using a Mac for development. Anybody have a solution to this?
You should first install node in your local machine.
Then, navigate to your project folder and delete node_modules directory.
Run on your local machine inside project directory:
npm install gulp --save-dev
Solved it!
Yes it appears to be that some of these paths from these package installs are too long for Windows. This means you can only install the gulp package after your VM is up. Here's what I did: (I also include a step for use with phpStorm already (since it will keep server pages loading faster on the VM)
SSH into the VM and create a folder called node_modules in your project's directory (the directory where package.json is).
In phpStorm, go to File > Settings > Build, Execution, Deployment > Deployment and click on the Excluded Paths tab. Click the Add deployment path button and add the folder node_modules from step 1.
SSH back into the VM and in your projects folder (should be directory folder with package.json) and run this command: npm install. This will install all packages listed in your package.json file locally to the directory you are in, and will put the necessary files into the folder node_modules.
Now run the gulp command: gulp
UPDATE:
If you really prefer file-sharing through a mounted folder, then I've created a Gist that will guide someone through all the challenges I faced and had to resolve, including how to successfully run npm install in the guest environment:
Laravel Homestead for Windows (includes fixes)

Polymer installation on windows

Has anyone installed Polymer on windows? I am new to using GIT and it says you need Bower and Node and some other things to get it to work.
We are working on a simple ZIP file for people to download and get started, but we haven't finished that yet.
Until we get that ZIP done, you will want to get started by installing Bower. Bower helps you manage component installations. You can worry about GIT later.
Install Bower:
Install nodejs
execute this command:
npm install -g bower
Make a project, acquire some Polymer elements:
make a project folder
inside project folder, execute this command:
bower install Polymer/polymer-ui-elements
That will produce a number of components in your project folder to help you get started. Please refer to http://polymer-project.org for more information.
Step 1:- install node.js
Step 2:- install Git
set the Git location Path (system's environmental variable)
like:-- D:\Program Files\Git\cmd
Step 3:- install bower using npm install -g bower command check the location of npm global binaries by using command (npm config get prefix).
copy the Path and set the bower location Path (system's environmental variable)
like--> C:\Users\USER_PROFILE\AppData\Roaming\npm
the whole Path will look like..(node to Polymer)
D:\Program Files\nodejs\;D:\Program Files\Git\cmd;C:\Users\USER_PROFILE\AppData\Roaming\npm
Step 4:- using command prompt go to project folder or create a project then type
bower install polymer
inside project
folder.

Resources