CN112527335A - Method, system and computer device for automating npm dependent package installation - Google Patents

Method, system and computer device for automating npm dependent package installation Download PDF

Info

Publication number
CN112527335A
CN112527335A CN202011517949.0A CN202011517949A CN112527335A CN 112527335 A CN112527335 A CN 112527335A CN 202011517949 A CN202011517949 A CN 202011517949A CN 112527335 A CN112527335 A CN 112527335A
Authority
CN
China
Prior art keywords
npm
installation
package
information
version
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011517949.0A
Other languages
Chinese (zh)
Other versions
CN112527335B (en
Inventor
陈亚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Enyike Beijing Data Technology Co ltd
Original Assignee
Enyike Beijing Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Enyike Beijing Data Technology Co ltd filed Critical Enyike Beijing Data Technology Co ltd
Priority to CN202011517949.0A priority Critical patent/CN112527335B/en
Publication of CN112527335A publication Critical patent/CN112527335A/en
Application granted granted Critical
Publication of CN112527335B publication Critical patent/CN112527335B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The present application relates to a method, system and computer device for automated processing npm of package-dependent installation, wherein the method comprises: a configuration initialization step of initializing npm the relevant configuration required by the automatic installation of the dependency package; a version judgment step, namely judging whether the node version is correct or not, and if the node version is wrong, installing a specified node version according to a corresponding prompt; npm installation step of the dependent package, when the node version is correct, reading and downloading a source image according to the relevant configuration, and installing npm dependent package according to the source image; and an installation exception solving step, wherein when the installation exception occurs, exception error reporting information is automatically generated and matched with an exception database, and a corresponding solution is obtained so as to complete npm installation of the dependency package. By means of the git code pulling or code merging and matching of the information of the abnormal database, the abnormal problem occurring in the process of automatically installing npm dependency packages is solved, automatic installation of npm dependency packages is achieved, manual solving is not needed, and the working efficiency of front-end development engineers is greatly improved.

Description

Method, system and computer device for automating npm dependent package installation
Technical Field
The present application relates to the field of front-end development technologies, and in particular, to a method, system, and computer device for automated processing npm dependent package installation.
Background
With the development of front-end mainstream three-frame read.js, vue.js and angular.js, npm dependence package management is used more and more frequently, npm dependence package is reasonably, efficiently and accurately used, and the front-end mainstream three-frame read.js, vue.js and angular.js becomes a skill which must be mastered by a front-end developer.
In the local development process, npm depends on manual command execution in the package installation process, and cannot automatically solve the abnormal problem condition of the installation process.
At present, no effective solution is provided for the problem of automatic installation in the related art.
Disclosure of Invention
The embodiment of the application provides a method, a system and computer equipment for automatically processing npm dependent package installation, after codes are pulled or merged by git, npm dependent packages can be automatically installed, commands do not need to be manually executed, and the problem that abnormal error reporting can be automatically solved by the codes in the npm dependent package installation process is solved.
In a first aspect, an embodiment of the present application provides a method for automatically processing npm a package-dependent installation, including the following steps:
a configuration initialization step of initializing npm the relevant configuration required by the automatic installation of the dependency package;
a version judgment step, namely judging whether the node version is correct or not, and if the node version is wrong, installing and specifying the node version according to a corresponding prompt;
npm installation step of dependent package, when the node version is correct, reading and downloading a source image according to the relevant configuration, and installing the npm dependent package according to the source image;
and an installation abnormity solving step, wherein when installation abnormity occurs, abnormity error reporting information is automatically generated to be matched with an abnormity database, and a corresponding solution is obtained so as to complete the installation of the npm dependency package.
In some embodiments, the installation exception resolution step may further include the steps of:
uploading abnormal error reporting information, namely uploading the abnormal error reporting information to the abnormal database when the matching of the abnormal error reporting information and the abnormal database fails;
a solution acquisition step, namely desensitizing the abnormal error reporting information and issuing the abnormal error reporting information to a solution collection platform to acquire a solution;
and updating the abnormal database, namely updating the solution to the abnormal database.
In some embodiments, the relevant configuration includes a data source image, an installation mode, a database configuration, and whether to start exception reporting.
In some embodiments, the exception database includes, but is not limited to, an exception error reporting ID, exception error reporting details, a description, a node version, npm version, npm package information, operating system information, and a solution, and the exception error reporting information matches the exception database according to the exception error reporting details, the description, the node version, the npm version, the npm package information, and the operating system information through sql language, finds and returns a corresponding solution.
In some embodiments, a code pulling determination step is further included between the initialization configuration step and the version determination step, and specifically includes:
and pulling or merging the front-end codes through a git tool, judging whether the pulling or merging of the codes is finished or not according to callback information, and automatically executing the npm install after the pulling or merging of the codes is finished.
In a second aspect, embodiments of the present application provide a system for automatically processing npm a package-dependent installation, including:
a configuration initialization module that initializes npm the relevant configuration required for the package-dependent automatic installation;
the version judgment module is used for judging whether the node version is correct or not, and if the node version is wrong, installing and specifying the node version according to the corresponding prompt;
npm a dependent package installation module, when the node version is correct, reading and downloading a source image according to the relevant configuration, and installing the npm dependent package according to the source image;
and the mounting abnormity solving module is used for automatically generating abnormity error reporting information to be matched with an abnormity database when mounting abnormity occurs, and obtaining a corresponding solution so as to complete the mounting of the npm dependency package.
In some embodiments, the installation exception resolution module may further include:
the abnormal error reporting information uploading unit is used for uploading the abnormal error reporting information to the abnormal database when the matching of the abnormal error reporting information and the abnormal database fails;
the solution acquisition unit is used for desensitizing the abnormal error reporting information and issuing the abnormal error reporting information to a solution collection platform to acquire a solution;
and the abnormal database updating unit is used for updating the solution to the abnormal database.
In some embodiments, the exception database includes, but is not limited to, an exception error reporting ID, exception error reporting details, a description, a node version, npm version, npm package information, operating system information, and a solution, and the exception error reporting information matches the exception database according to the exception error reporting details, the description, the node version, the npm version, the npm package information, and the operating system information through sql language, finds and returns a corresponding solution.
In some embodiments, a code pulling and judging module is further connected between the initialization configuration module and the node version judging module, the code pulling and judging module performs front-end code pulling or code merging through a git tool, judges whether code pulling is finished or whether code merging is finished according to callback information, and automatically executes npm install after the code pulling is finished.
In a third aspect, embodiments of the present application provide a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the computer program, implements the method for automatically processing npm dependent package installation as described in the first aspect.
Compared with the related art, the method, the system and the computer equipment for automatically processing npm dependency package installation solve the abnormal problem occurring in the process of automatically installing npm dependency packages through git code pulling or code merging and matching with the information of the abnormal database, realize the automatic installation of npm dependency packages, do not need manual solution, and greatly improve the working efficiency of front-end development engineers.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow diagram of a method of automating the processing npm of dependent package installation according to an embodiment of the present application;
FIG. 2 is a flow chart of installation exception resolution steps according to an embodiment of the present application;
FIG. 3 is a flow diagram of a method for automating npm dependent package installation in accordance with a preferred embodiment of the present application;
FIG. 4 is a block diagram of a system for automating npm dependent package installation according to an embodiment of the present application;
fig. 5 is a hardware structure diagram of a computer device according to an embodiment of the present application.
Description of the drawings:
configuring an initialization module 1; a version judging module 2; npm rely on the package to install module 3;
installing an abnormity solving module 4; an abnormal error information uploading unit 41; a solution acquisition unit 42;
an abnormality database updating unit 43; a processor 81; a memory 82;
a communication interface 83; a bus 80.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
The invention relates to a scheme for automatically processing npm exception error report depending on package installation. The problem that npm dependency packages can be automatically installed after code is pulled or combined through git in the local development process of a front-end development engineer is solved, commands do not need to be manually executed, and the problem that abnormal error reporting can be automatically solved when npm dependency packages are installed is solved. The invention can improve the working efficiency of the front-end development engineer, saves the time cost for the front-end development engineer to solve the abnormal error report in the npm-dependent package installation process, and simultaneously reduces the technical threshold and the communication cost of the operation project.
Some concepts involved in the present invention are explained as follows:
npm default package management tool for node. The code can be installed, shared, distributed and the project dependency relationship can be managed through npm.
git is an open source distributed version control system, which can effectively process the management of the project version from very small to very large at high speed.
Js is a JavaScript runtime based on Chrome V8 engine.
The present embodiment provides a method for automating npm dependent package installation. Fig. 1 is a flow chart of a method of automating npm dependent package installation according to an embodiment of the present application, as shown in fig. 1, the flow chart including the steps of:
a configuration initialization step S1, initializing npm the relevant configuration required for the automatic installation of the dependent package;
a version judgment step S2, judging whether the node version is correct, if so, installing the specified node version according to the corresponding prompt;
npm dependent package installation step S3, when the node version is correct, reading and downloading a source image according to the relevant configuration, and installing npm dependent package accordingly;
and an installation exception solving step S4, wherein when an installation exception occurs, an exception error reporting message is automatically generated and matched with an exception database to obtain a corresponding solution so as to complete installation of the npm dependency package.
Through the steps, firstly, relevant configuration of the dependency package is prepared and installed npm, early preparation of automatic installation is made, the dependency package is installed npm after a check node version is pulled and checked to be correct, abnormal problems occurring in the installation process are automatically detected, abnormal error reporting information is automatically generated, and the abnormal error reporting information is matched with a pre-designed abnormal database to obtain a solution. In the above steps, when the code is pulled or combined, the npm install can be automatically triggered, a manual command does not need to be input, convenience and convenience are realized, the automatic installation of the npm dependence package is realized, the problem of error reporting of abnormal installation of the npm dependence package can be automatically processed, manual solution is not needed, and the working efficiency of a front-end development engineer is greatly improved. Meanwhile, the burial method provided by the method is automatically executed, so that the technical threshold and the communication cost of the operation project are greatly reduced.
The invention can also analyze according to the mass data in the abnormal database to evaluate the potential use risks of some npm dependent packages.
Fig. 2 is a flowchart of an installation exception solving step according to an embodiment of the present application, and as shown in fig. 2, in some embodiments, the installation exception solving step S4 may further include the following steps:
an abnormal error reporting information uploading step S41, wherein when the matching between the abnormal error reporting information and the abnormal database fails, the abnormal error reporting information is uploaded to the abnormal database;
a solution acquisition step S42, namely desensitizing the abnormal error reporting information and issuing the abnormal error reporting information to a solution collection platform to acquire a solution;
an exception database update step S43 updates the solution to the exception database.
Through the steps, the abnormal problems which are not recorded in the existing abnormal database can be processed, the possibility of solving the abnormal problems is greatly increased, and the efficiency of automatically installing npm the dependency package is improved.
In some embodiments, the relevant configuration includes data source mirroring, installation mode, database configuration, and whether to start exception reporting.
In some embodiments, the exception database includes, but is not limited to, an exception error report ID, exception error report detail information, description, node version, npm version, npm package information, operating system information, and a solution, and the exception error report information is matched with the exception database through sql language according to the exception error report detail information, description, node version, npm version, npm package information, and operating system information, and a corresponding solution is searched and returned.
And the table lookup is directly carried out through the sql statement, so that the operation is simple and rapid.
The specific structure of the above exception database is shown in the following table:
Figure BDA0002848039800000061
Figure BDA0002848039800000071
the exception database records npm common error information and solutions encountered during the installation process of the dependent package. According to the solution recorded in the abnormal database, the abnormal error report can be quickly positioned and solved.
In some embodiments, the step of determining the version further includes a step of determining whether the version of the code is a version of the code, and specifically includes:
and pulling or merging the front-end codes through a git tool, judging whether the pulling of the codes is finished or whether the merging of the codes is finished according to callback information, and automatically executing the npm install after the completion.
The embodiments of the present application are described and illustrated below by means of preferred embodiments.
FIG. 3 is a flow chart of a method of automating npm dependent package installation according to a preferred embodiment of the present application.
S301, initialization of related configuration for installation
Initializing npm relevant configurations required for the package-dependent automatic installation, the relevant configurations including: the method comprises the following steps of data source mirroring, installation modes, database configuration and whether abnormal data is reported, wherein the data source mirroring comprises the following steps: npm, yarn, cnpm, taobao, nj, npmMirror and edunpm, and the installation mode comprises global installation and local installation.
The specific implementation form is as follows:
Figure BDA0002848039800000072
s302, pulling codes or combining codes
Replace or merge code from a remote git library using http or hhs through the git tool. And judging whether the pulling is completed or the merging is completed according to the callback information, wherein the specific implementation mode is as follows:
Figure BDA0002848039800000081
s303, judging the version number of the node
After the code is pulled, automatically detecting whether the node version is correct, and reading related configuration information when the node version number is correct; and when the node version has errors, automatically installing the required specified version according to the prompt, and after the installation is finished, re-detecting the node version through command execution until the version is correct.
S304, npm dependent bag installation
And automatically switching npm the dependence package to download the source mirror image according to the related configuration information, automatically executing npm install, starting installation, if abnormal processing does not exist, npm the dependence package is successfully installed, automatically running the project, and checking through a browser.
S305, installation exception processing
When an abnormal condition occurs in the installation process, the installation of the dependence package is automatically suspended npm, the abnormity is automatically marked and recorded, a solution of the abnormal pair is generated and matched from the abnormity database according to the abnormity error reporting information, the solution is returned and automatically executed after the matching is successful, and the step is returned to S304 after the abnormity is solved.
S306, matching failure processing abnormal error reporting information
And when the abnormal error reporting information cannot be matched with the corresponding solution from the abnormal database, uploading the abnormal error reporting information to the abnormal database, performing desensitization processing, disclosing a syndrome solution, updating the obtained solution to the abnormal database, and returning to the step S305.
In the above step S302, the node version can be installed directly by command execution, and in the step S306, the exception can be resolved by manual detection.
It should be noted that the steps illustrated in the above-described flow diagrams or in the flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order different than here.
The present embodiment further provides a system for automatically processing npm package-dependent installation, which is used to implement the foregoing embodiments and preferred embodiments, and the description of the system that has been already made is omitted. As used hereinafter, the terms "module," "unit," "subunit," and the like may implement a combination of software and/or hardware for a predetermined function. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
Fig. 4 is a block diagram of a system for automating npm dependent package installation according to an embodiment of the present application, as shown in fig. 4, the system comprising:
configuring an initialization module 1, initializing npm the relevant configuration required by the automatic installation of the dependent package;
the version judging module 2 is used for judging whether the node version is correct or not, and if the node version is wrong, installing the specified node version according to the corresponding prompt;
npm the dependent package installation module 3, when the node version is correct, reading and downloading a source image according to the relevant configuration, and installing npm the dependent package according to the source image;
and the installation abnormity solving module 4 automatically generates abnormity error reporting information to be matched with an abnormity database when the installation abnormity occurs, and obtains a corresponding solution to complete npm installation of the dependency package.
The problem of abnormity in the process of automatically installing npm dependence packages can be solved by arranging the installation abnormity solving module 4, and the success rate and efficiency of automatic installation are improved.
In some of these embodiments, the installation exception resolution module 4 may further include:
an abnormal error reporting information uploading unit 41, configured to upload the abnormal error reporting information to the abnormal database when the matching between the abnormal error reporting information and the abnormal database fails;
the solution acquisition unit 42 performs desensitization processing on the abnormal error reporting information, and issues the abnormal error reporting information to a solution collection platform to acquire a solution;
the anomaly database updating unit 43 updates the solution to the anomaly database.
In some embodiments, the exception database includes, but is not limited to, an exception error report ID, exception error report detail information, description, node version, npm version, npm package information, operating system information, and a solution, and the exception error report information is matched with the exception database through sql language according to the exception error report detail information, description, node version, npm version, npm package information, and operating system information, and a corresponding solution is searched and returned.
In some embodiments, a code pulling and judging module is further connected between the initialization configuration module and the node version judging module, the code pulling and judging module performs front-end code pulling or code merging through a git tool, judges whether code pulling is finished or whether code merging is finished according to callback information, and automatically executes npm install after the code pulling is finished.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
Additionally, the method of automating the processing npm of the embodiments of the present application described in connection with FIG. 1 in connection with package installation may be implemented by a computer device. Fig. 5 is a hardware structure diagram of a computer device according to an embodiment of the present application.
The computer device may comprise a processor 81 and a memory 82 in which computer program instructions are stored.
Specifically, the processor 81 may include a Central Processing Unit (CPU), or A Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
Memory 82 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 82 may include a Hard Disk Drive (Hard Disk Drive, abbreviated to HDD), a floppy Disk Drive, a Solid State Drive (SSD), flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 82 may include removable or non-removable (or fixed) media, where appropriate. The memory 82 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 82 is a Non-Volatile (Non-Volatile) memory. In particular embodiments, Memory 82 includes Read-Only Memory (ROM) and Random Access Memory (RAM). The ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), Electrically rewritable ROM (EAROM), or FLASH Memory (FLASH), or a combination of two or more of these, where appropriate. The RAM may be a Static Random-Access Memory (SRAM) or a Dynamic Random-Access Memory (DRAM), where the DRAM may be a Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), an Extended data output Dynamic Random-Access Memory (EDODRAM), a Synchronous Dynamic Random-Access Memory (SDRAM), and the like.
The memory 82 may be used to store or cache various data files for processing and/or communication use, as well as possible computer program instructions executed by the processor 81.
The processor 81 implements any of the above described methods of automating the processing npm of dependent package installation by reading and executing computer program instructions stored in the memory 82.
In some of these embodiments, the computer device may also include a communication interface 83 and a bus 80. As shown in fig. 5, the processor 81, the memory 82, and the communication interface 83 are connected via the bus 80 to complete communication therebetween.
The communication interface 83 is used for implementing communication between modules, devices, units and/or equipment in the embodiment of the present application. The communication port 83 may also be implemented with other components such as: the data communication is carried out among external equipment, image/data acquisition equipment, a database, external storage, an image/data processing workstation and the like.
Bus 80 includes hardware, software, or both to couple the components of the computer device to each other. Bus 80 includes, but is not limited to, at least one of the following: data Bus (Data Bus), Address Bus (Address Bus), Control Bus (Control Bus), Expansion Bus (Expansion Bus), and Local Bus (Local Bus). By way of example, and not limitation, Bus 80 may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (FSB), a Hyper Transport (HT) Interconnect, an ISA (ISA) Bus, an InfiniBand (InfiniBand) Interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a microchannel Architecture (MCA) Bus, a PCI (Peripheral Component Interconnect) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a Video Electronics Bus (audio Electronics Association), abbreviated VLB) bus or other suitable bus or a combination of two or more of these. Bus 80 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
The computer device may execute the method for automatically processing npm dependent package installation in the embodiment of the present application based on the obtained npm dependent package installation required related configuration, thereby implementing the method for automatically processing npm dependent package installation described in conjunction with fig. 1.
In addition, in conjunction with the method for automatically processing npm dependent on package installation in the above embodiments, embodiments of the present application may provide a computer-readable storage medium to implement. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by the processor, implement any of the methods of automating the processing npm of dependent package installation described above.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of automating npm dependent package installation, comprising the steps of:
a configuration initialization step of initializing npm the relevant configuration required by the automatic installation of the dependency package;
a version judgment step, namely judging whether the node version is correct or not, and if the node version is wrong, installing and specifying the node version according to a corresponding prompt;
npm installation step of dependent package, when the node version is correct, reading and downloading a source image according to the relevant configuration, and installing the npm dependent package according to the source image;
and an installation abnormity solving step, wherein when installation abnormity occurs, abnormity error reporting information is automatically generated to be matched with an abnormity database, and a corresponding solution is obtained so as to complete the installation of the npm dependency package.
2. The method of automated processing npm relying on package installation according to claim 1, wherein the installation exception resolution step further comprises the steps of:
uploading abnormal error reporting information, namely uploading the abnormal error reporting information to the abnormal database when the matching of the abnormal error reporting information and the abnormal database fails;
a solution acquisition step, namely desensitizing the abnormal error reporting information and issuing the abnormal error reporting information to a solution collection platform to acquire a solution;
and updating the abnormal database, namely updating the solution to the abnormal database.
3. The method of automated processing npm relying on package installation of claim 1, wherein the relevant configurations include data source mirroring, installation means, database configuration, and whether exception reporting is enabled.
4. The method of automated processing npm relying on package installation according to claim 1, wherein the exception database includes, but is not limited to, exception error reporting ID, detail information, description, node version, npm version, npm package information, operating system information, and solution, and the exception error reporting information matches the exception database by sql language according to the detail information, the description, the node version, the npm version, the npm package information, and the operating system information, finds and returns the corresponding solution.
5. The method of claim 1, wherein the step of initializing configuration and the step of determining version further comprise a step of determining code pull, specifically comprising:
and pulling or merging the front-end codes through a git tool, judging whether the pulling or merging of the codes is finished or not according to callback information, and automatically executing the npm install after the pulling or merging of the codes is finished.
6. A system for automating the processing npm of package-dependent installations, comprising:
a configuration initialization module that initializes npm the relevant configuration required for the package-dependent automatic installation;
the version judgment module is used for judging whether the node version is correct or not, and if the node version is wrong, installing and specifying the node version according to the corresponding prompt;
npm a dependent package installation module, when the node version is correct, reading and downloading a source image according to the relevant configuration, and installing the npm dependent package according to the source image;
and the mounting abnormity solving module is used for automatically generating abnormity error reporting information to be matched with an abnormity database when mounting abnormity occurs, and obtaining a corresponding solution so as to complete the mounting of the npm dependency package.
7. The system for automated processing npm relying on package installation according to claim 6, wherein the installation exception resolution module further comprises:
the abnormal error reporting information uploading unit is used for uploading the abnormal error reporting information to the abnormal database when the matching of the abnormal error reporting information and the abnormal database fails;
the solution acquisition unit is used for desensitizing the abnormal error reporting information and issuing the abnormal error reporting information to a solution collection platform to acquire a solution;
and the abnormal database updating unit is used for updating the solution to the abnormal database.
8. The system of claim 6, wherein the exception database includes, but is not limited to, an exception error report ID, an exception error report detail, a description, a node version, a npm version, npm packet information, operating system information, and a solution, and wherein the exception error report information is matched with the exception database via sql language according to the exception error report detail, the description, the node version, the npm version, the npm packet information, and the operating system information, and is searched for and returned to correspond to the solution.
9. The system for automated processing npm dependent package installation according to claim 6, wherein a code pulling determination module is further connected between the initialization configuration module and the node version determination module, the code pulling determination module performs front-end code pulling or code merging by a git tool, determines whether code pulling is finished or code merging is finished according to callback information, and automatically executes npm install after finishing.
10. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements a method of automatically processing npm dependent package installation as recited in any of claims 1-5.
CN202011517949.0A 2020-12-21 2020-12-21 Method, system and computer device for automated processing npm dependent package installation Active CN112527335B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011517949.0A CN112527335B (en) 2020-12-21 2020-12-21 Method, system and computer device for automated processing npm dependent package installation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011517949.0A CN112527335B (en) 2020-12-21 2020-12-21 Method, system and computer device for automated processing npm dependent package installation

Publications (2)

Publication Number Publication Date
CN112527335A true CN112527335A (en) 2021-03-19
CN112527335B CN112527335B (en) 2024-04-19

Family

ID=75002063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011517949.0A Active CN112527335B (en) 2020-12-21 2020-12-21 Method, system and computer device for automated processing npm dependent package installation

Country Status (1)

Country Link
CN (1) CN112527335B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282307A (en) * 2021-06-11 2021-08-20 云宏信息科技股份有限公司 Method, server and system for batch installation of ansable server to software

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090327654A1 (en) * 2008-06-30 2009-12-31 International Business Machines Corporation Method of Handling Duplicate or Invalid Node Controller IDs in a Distributed Service Processor Environment
CN109800001A (en) * 2019-01-02 2019-05-24 郑州云海信息技术有限公司 A kind of method and device for automating downloading mirror image and installing KVM virtual machine
CN110162332A (en) * 2019-05-20 2019-08-23 深圳前海微众银行股份有限公司 A kind of construction method and system of RN project
CN111046311A (en) * 2019-12-17 2020-04-21 深圳前海环融联易信息科技服务有限公司 Method and device for realizing traceless iteration version of PC (personal computer) end, computer equipment and storage medium
CN111198695A (en) * 2019-12-25 2020-05-26 航天信息股份有限公司 Automatic deployment method of micro-service administration management platform and electronic equipment
CN111258565A (en) * 2020-01-21 2020-06-09 深圳乐信软件技术有限公司 Method, system, server and storage medium for generating small program
CN111427558A (en) * 2020-04-10 2020-07-17 创盛视联数码科技(北京)有限公司 Method for customizing front-end automatic development environment based on webpack
CN111522577A (en) * 2020-04-13 2020-08-11 京东数字科技控股有限公司 Dependency package version management method, device, equipment and storage medium
CN111897548A (en) * 2020-07-24 2020-11-06 平安证券股份有限公司 Front-end resource publishing method and device, electronic equipment and computer storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090327654A1 (en) * 2008-06-30 2009-12-31 International Business Machines Corporation Method of Handling Duplicate or Invalid Node Controller IDs in a Distributed Service Processor Environment
CN109800001A (en) * 2019-01-02 2019-05-24 郑州云海信息技术有限公司 A kind of method and device for automating downloading mirror image and installing KVM virtual machine
CN110162332A (en) * 2019-05-20 2019-08-23 深圳前海微众银行股份有限公司 A kind of construction method and system of RN project
CN111046311A (en) * 2019-12-17 2020-04-21 深圳前海环融联易信息科技服务有限公司 Method and device for realizing traceless iteration version of PC (personal computer) end, computer equipment and storage medium
CN111198695A (en) * 2019-12-25 2020-05-26 航天信息股份有限公司 Automatic deployment method of micro-service administration management platform and electronic equipment
CN111258565A (en) * 2020-01-21 2020-06-09 深圳乐信软件技术有限公司 Method, system, server and storage medium for generating small program
CN111427558A (en) * 2020-04-10 2020-07-17 创盛视联数码科技(北京)有限公司 Method for customizing front-end automatic development environment based on webpack
CN111522577A (en) * 2020-04-13 2020-08-11 京东数字科技控股有限公司 Dependency package version management method, device, equipment and storage medium
CN111897548A (en) * 2020-07-24 2020-11-06 平安证券股份有限公司 Front-end resource publishing method and device, electronic equipment and computer storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
P. GOSWAMI 等: "Investigating The Reproducibility of NPM Packages", 《2020 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME)》, 2 November 2020 (2020-11-02), pages 677 - 681 *
黄经赢 等: "基于Socket.io+Node.js+Redis构建高效即时通讯系统", 《现代计算机(专业版)》, no. 13, 27 August 2014 (2014-08-27), pages 62 - 64 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282307A (en) * 2021-06-11 2021-08-20 云宏信息科技股份有限公司 Method, server and system for batch installation of ansable server to software

Also Published As

Publication number Publication date
CN112527335B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
KR101921052B1 (en) Method and apparatus for identifying security vulnerability and cause point thereof of executable binaries
US10846073B2 (en) Methods, apparatuses, terminals, servers, and systems for container generation
US10579513B2 (en) Test run control method and apparatus
CN109271359B (en) Log information processing method and device, electronic equipment and readable storage medium
WO2015090143A1 (en) Method and apparatus for finding bugs in computer program codes
US20130275948A1 (en) Compiling Source Code For Debugging With Expanded Snapshots
CN107220175B (en) Application program endless loop positioning method and device, computer equipment and storage medium
CN111459798A (en) Test method, test device, test medium, and electronic apparatus
CN112149136A (en) loT device firmware vulnerability detection method and system and electronic device
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN110569058B (en) System upgrading method, device, terminal and computer readable storage medium
US20190121985A1 (en) Detecting vulnerabilities in applications during execution
CN112527335A (en) Method, system and computer device for automating npm dependent package installation
CN106708550B (en) Method and device for loading shared object library
CN111338864B (en) Memory problem detection method, device, computer equipment and storage medium
CN109684205B (en) System testing method, device, electronic equipment and storage medium
CN109491951B (en) Data configuration method and computing equipment
CN116303099A (en) Cross-platform rapid deployment method, device, medium and equipment for automatic test environment
CN108959915B (en) Rootkit detection method, rootkit detection device and server
CN116302738A (en) Method, system, equipment and storage medium for testing chip
CN109408063B (en) Instruction pile inserting method and device based on virtual machine
CN115629779A (en) Hot updating method, device, equipment and computer storage medium
KR20190055776A (en) Method and apparatus for identifying security vulnerability and cause point thereof of executable binaries
CN113220362A (en) Log record obtaining method and device, computer equipment and storage medium
CN114035846A (en) Instruction verification method and instruction verification device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant