P
P
pomaz_andrew2017-09-20 15:52:55
Java
pomaz_andrew, 2017-09-20 15:52:55

How to identify packages not included in package.json?

Making a project in Angular2. We use Git for version control. We push the working files of the project to the master branch. Next, one of the developers makes a clone of the repo, run the npm install command. As a result, we cannot build the project - all the npm packages of the project are not downloaded, that is, something is not written in the project config, but there are packages. How to identify missing packages and then add them to the project config?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Valentin Khoroshilov, 2019-06-06
@horoshi10v

I figured it out myself, here's how it goes:

package com.example.webnure;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.JavascriptInterface;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;


public class MainActivity extends AppCompatActivity {

    @SuppressLint("SetJavaScriptEnabled")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        WebView webView = new WebView(this);
        setContentView(webView);
        webView.setWebViewClient(new WebViewClient());
        webView.loadUrl("https://nure.ua/");
        
    }
    
}

But, now I have another question - how to add JavaScript support to the code?

S
Sergey, 2017-09-20
@sergey_kzn

Git has nothing to do with it. Look at what npm swears at when building and add it to package.json.

A
Alexey Budaev, 2017-09-20
@Markus_Kane

The issue is not in Git.
NPM installs the packages that are listed in package.json.
Accordingly, you need to identify packages that are not in the config and install them again with the -S or --save flag.
Or register them manually in the same file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question