CN112527335B - Method, system and computer device for automated processing npm dependent package installation - Google Patents

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

Info

Publication number
CN112527335B
CN112527335B CN202011517949.0A CN202011517949A CN112527335B CN 112527335 B CN112527335 B CN 112527335B CN 202011517949 A CN202011517949 A CN 202011517949A CN 112527335 B CN112527335 B CN 112527335B
Authority
CN
China
Prior art keywords
npm
installation
abnormal
information
error reporting
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.)
Active
Application number
CN202011517949.0A
Other languages
Chinese (zh)
Other versions
CN112527335A (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

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

Abstract

The present application relates to a method, system and computer device for automated processing npm dependent on package installation, wherein the method comprises: a configuration initialization step of initializing npm related configurations required for automatic installation of the dependent package; a version judging step of judging whether the node version is correct or not, if so, installing the designated node version according to the corresponding prompt; npm a dependent package installation step, when the node version is correct, reading and downloading a source image according to the related configuration, and installing npm dependent packages according to the source image; and a step of solving the installation abnormality, wherein when the installation abnormality occurs, an abnormality error reporting message is automatically generated to be matched with an abnormality database, and a corresponding solution is obtained to complete npm installation of the dependent package. By pulling the git codes or combining the codes and matching the information of the abnormal database, the abnormal problem in the process of automatically installing npm dependent packages is solved, the automatic installation of npm dependent packages is realized, the manual solution is not needed, and the working efficiency of front-end development engineers is greatly improved.

Description

Method, system and computer device for automated processing npm dependent package installation
Technical Field
The application relates to the technical field of front-end development, in particular to a method, a system and computer equipment for automatically processing npm dependent package installation.
Background
Along with the development of front-end mainstream three frames, compact.js, vue.js and angular.js, npm is more and more frequently used depending on package management, npm is reasonably, efficiently and accurately used depending on packages, and the development of front-end developers is a skill which needs to be mastered.
In the local development process, npm needs to manually execute the command in the process of depending on package installation, and the abnormal problem condition of the installation process cannot be automatically solved.
At present, no effective solution is proposed 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, wherein npm dependent packages can be automatically installed after codes are pulled or combined through git, commands do not need to be manually executed, and the problem that abnormal reporting errors in the npm dependent package installation process can be automatically solved through codes is solved.
In a first aspect, an embodiment of the present application provides a method for automatically handling npm dependent package installations, including the steps of:
A configuration initialization step of initializing npm related configurations required for automatic installation of the dependent package;
A version judging step of judging whether the node version is correct or not, if so, installing and designating the node version according to the corresponding prompt;
npm a dependent package installation step, when the node version is correct, reading and downloading a source image according to the related configuration, and installing the npm dependent package accordingly;
And a step of solving the installation abnormality, wherein when the installation abnormality occurs, an abnormality error reporting message is automatically generated to be matched with an abnormality database, and a corresponding solution is obtained to finish the installation of the npm dependent package.
In some of these embodiments, the installation exception resolution step may further include the steps of:
An abnormal error reporting information uploading step, namely uploading the abnormal error reporting information to the abnormal database when the abnormal error reporting information fails to be matched with the abnormal database;
a solution acquisition step, namely performing desensitization processing on 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 data source mirroring, installation, database configuration, and whether exception reporting is enabled.
In some embodiments, the exception database includes, but is not limited to, an exception reporting ID, exception reporting details, a description, a node version, a npm version, npm package information, operating system information, and a solution, and the exception reporting information matches the exception database through sql language according to the exception reporting details, the description, the node version, the npm version, the npm package information, and the operating system information, searches for and returns a corresponding solution.
In some embodiments, the initialization configuration step and the version determination step further include a code pull determination step, which specifically includes:
And carrying out front-end code pulling or code merging through a git tool, judging whether the code pulling is finished or whether the code merging is finished according to callback information, and automatically executing NPM INSTALL after finishing.
In a second aspect, embodiments of the present application provide a system for automated processing npm of dependent package installations, comprising:
a configuration initialization module for initializing npm related configurations required for automatic installation of the dependent package;
the version judging module is used for judging whether the node version is correct or not, and if the node version is incorrect, installing and designating the node version according to the corresponding prompt;
npm dependent package installation module, when the node version is correct, reading and downloading a source image according to the related configuration, and installing the npm dependent package according to the source image;
And when the installation abnormality occurs, the installation abnormality solving module automatically generates abnormality error reporting information to be matched with an abnormality database, and a corresponding solution is obtained to finish the installation of the npm dependent package.
In some of these embodiments, the installation exception resolution module may further comprise:
An abnormal error reporting information uploading unit, configured to upload the abnormal error reporting information to the abnormal database when the abnormal error reporting information fails to match with the abnormal database;
the solution acquisition unit is used for carrying out desensitization processing on the abnormal error reporting information and issuing the abnormal error reporting information to a solution collection platform so as 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 reporting ID, exception reporting details, a description, a node version, a npm version, npm package information, operating system information, and a solution, and the exception reporting information matches the exception database through sql language according to the exception reporting details, the description, the node version, the npm version, the npm package information, and the operating system information, searches for and returns a corresponding solution.
In some embodiments, a code pulling judging module is further connected between the initialization configuration module and the node version judging module, and the code pulling judging module performs front-end code pulling or code merging through a git tool, judges whether the code pulling is finished or whether the code merging is finished according to callback information, and automatically executes NPM INSTALL after finishing.
In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements a method for automated processing npm dependent on package installation as described in the first aspect above when the computer program is executed by the processor.
Compared with the related art, the method, the system and the computer equipment for automatically processing npm depending on the package installation solve the abnormal problem in the process of automatically installing npm depending on the package by pulling the git code or combining the code and matching the information of the abnormal database, realize the automatic installation of npm depending on the package, 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 other features, objects, and advantages 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 specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a method of automated processing npm of dependent package installation, in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of an installation anomaly resolution step in accordance with an embodiment of the present application;
FIG. 3 is a flowchart of a method for automated processing npm of dependent packet installation in accordance with a preferred embodiment of the present application;
FIG. 4 is a block diagram of a system for automated processing npm dependent on package installation, in accordance with an embodiment of the present application;
Fig. 5 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present application.
Description of the drawings:
configuring an initialization module 1; a version judgment module 2; npm rely on package installation module 3;
Installing an abnormality solving module 4; an abnormal error information uploading unit 41; a solution acquisition unit 42;
an abnormal database updating unit 43; a processor 81; a memory 82;
a communication interface 83; a bus 80.
Detailed Description
The present application will be described and illustrated with reference to the accompanying drawings and examples in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by a person of ordinary skill in the art based on the embodiments provided by the present application without making any inventive effort, are intended to fall within the scope of the present application.
It is apparent that the drawings in the following description are only some examples or embodiments of the present application, and it is possible for those of ordinary skill in the art to apply the present application to other similar situations according to these drawings without inventive effort. Moreover, it should be appreciated that while such a development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as having the benefit of this disclosure.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases 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. It is to be expressly and implicitly understood by those of ordinary skill in the art that the described embodiments of the application can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," and similar referents in the context of the application are not to be construed as limiting the quantity, but rather as singular or plural. The terms "comprising," "including," "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in connection with the present application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
The invention relates to a scheme for automatically processing npm depending on packet installation exception reporting errors. The method solves the problems that a front-end development engineer can automatically install npm dependent packages after pulling or merging codes through git in the local development process, does not need to manually execute commands, and can automatically solve the problem that abnormal errors are reported in the npm dependent package installation process through codes. The invention can improve the working efficiency of the front-end development engineer, save the time cost spent by the front-end development engineer in the npm dependent package installation process for solving the abnormal error reporting, and reduce the technical threshold and the communication cost of operation projects.
Part of the concepts involved in the present invention are explained as follows:
npm default package administration tools for node. Js platform. Code can be installed, shared, distributed through npm, managing project dependencies.
Git is an open-source distributed version control system capable of efficiently and quickly processing project version management from very small to very large.
Node. Js is a JavaScript runtime based on the Chrome V8 engine.
The present embodiment provides a method for automated processing npm dependent on package installation. FIG. 1 is a flow chart of a method for automated processing npm of dependent packet installation, as shown in FIG. 1, according to an embodiment of the present application, the flow includes the steps of:
a configuration initialization step S1, wherein the initialization npm relies on the relevant configuration required by the automatic package installation;
A version judging step S2, judging whether the node version is correct or not, if so, installing the designated 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 related configuration, and installing npm dependent package according to the source image;
And S4, when installation abnormality occurs, automatically generating abnormality error reporting information to be matched with an abnormality database, and obtaining a corresponding solution to complete npm installation of the dependent package.
Through the steps, the relevant configuration of the installation npm dependent package is prepared, the early preparation of automatic installation is prepared, the code version is pulled and checked, the installation npm dependent package is started after the code version is checked to be free, the abnormal problem in the installation process is automatically detected, the 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 replaced or combined, NPM INSTALL can be automatically triggered, a command is not required to be manually input, convenience and convenience are realized, automatic installation of npm dependent packages is realized, the problem of error reporting of abnormal installation of npm dependent packages can be automatically processed, manual solving is not required, and the working efficiency of front-end development engineers is greatly improved. Meanwhile, the burying method provided by the method is automatically executed, so that the technical threshold and the communication cost of operation projects are greatly reduced.
The invention can also analyze according to mass data in the abnormal database, and evaluate the potential use risks of some npm dependent packages.
FIG. 2 is a flow chart of an installation anomaly resolution step according to an embodiment of the present application, as shown in FIG. 2, in some of which the installation anomaly resolution step S4 may further include the steps of:
step S41 of uploading the abnormal error reporting information, wherein when the abnormal error reporting information fails to be matched with the abnormal database, the abnormal error reporting information is uploaded to the abnormal database;
A solution acquisition step S42, which is to desensitize the abnormal error reporting information and issue 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 the step S43.
By the steps, the unrecorded abnormal problems 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 dependent packages is improved.
In some of these embodiments, the relevant configuration includes data source mirroring, installation, database configuration, and whether exception reporting is enabled.
In some embodiments, the exception database includes, but is not limited to, an exception reporting ID, exception reporting details, description, node version, npm version, npm package information, operating system information, and solutions, and the exception reporting information is matched with the exception database by sql language according to the exception reporting details, description, node version, npm version, npm package information, and operating system information, and the corresponding solutions are found and returned.
The table lookup is directly performed through the sql statement, and the operation is simple and quick.
The specific structure of the abnormal database is as follows:
the exception database records common error reporting information and solutions encountered by the collection npm dependent package during installation. According to the solution recorded in the abnormal database, the abnormal error can be rapidly positioned and solved.
In some embodiments, the method further includes a code pull determination step between the initialization configuration step and the version determination step, specifically including:
And carrying out front-end code pulling or code merging through a git tool, judging whether the code pulling is finished or whether the code merging is finished according to callback information, and automatically executing NPM INSTALL after the code pulling is finished or the code merging is finished.
The embodiments of the present application will be described and illustrated below by means of preferred embodiments.
FIG. 3 is a flowchart of a method for automated processing npm dependent on package installation in accordance with a preferred embodiment of the present application.
S301, initializing related configuration for installation
Initialization npm relies on the relevant configuration required for automatic installation of the package, including: the data source mirror image, the installation mode, the database configuration and whether to report abnormal data or not, wherein the data source mirror image comprises: npm, yarn, cnpm, taobao, nj, npmMirror, and edunpm, the installation modes include global installation and local installation.
Specific implementation forms are as follows:
S302, pulling code or merging code
The code is pulled from the remote git library or merged using http or hhs by the git tool. Judging whether pulling or merging is completed according to callback information, wherein the specific implementation mode is as follows:
S303, judging the node version number
After the code pulling is finished, automatically detecting whether the node version is correct, and reading relevant configuration information when the node version number is correct; when the node version is wrong, according to the appointed version which prompts automatic installation requirement, after the installation is completed, the node version is re-detected through command execution until the version is correct.
S304, npm dependent package installation
And automatically switching npm the dependent package download source image according to the related configuration information, automatically executing NPM INSTALL, starting installation, if no abnormal processing exists, automatically running the project if npm the dependent package is successfully installed, and checking through a browser.
S305, installation exception handling
When an abnormal situation occurs in the installation process, automatically pausing npm the installation of the dependent package, automatically marking and recording the abnormality, generating and matching the solution of the abnormality pair from the abnormality database according to the abnormality error reporting information, returning to the solution and automatically executing after the matching is successful, and returning to S304 after the abnormality is solved.
S306, processing abnormal error reporting information in case of matching failure
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 solicitation solution, updating the acquired solution to the abnormal database, and returning to S305.
The step S302 may be directly executed by a command to complete the installation of the node version, and the step S306 may be manually executed to perform detection to solve the exception.
It should be noted that the steps illustrated in the above-described flow or 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 other than that illustrated herein.
The present embodiment also provides a system for automatically processing npm package installation, which is used to implement the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the terms "module," "unit," "sub-unit," and the like may be a combination of software and/or hardware that implements a predetermined function. While the system described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
FIG. 4 is a block diagram of a system for automated processing npm dependent on package installation, according to an embodiment of the present application, as shown in FIG. 4, the system includes:
a configuration initialization module 1, wherein the initialization npm relies on the relevant configuration required by the automatic package installation;
The version judging module 2 judges whether the node version is correct or not, if so, the designated node version is installed according to the corresponding prompt;
npm 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 dependent package according to the source image;
And the installation abnormality solving module 4 automatically generates abnormality error reporting information to be matched with an abnormality database when the installation abnormality occurs, and obtains a corresponding solution to complete npm installation of the dependent package.
The problem of abnormality in the process of automatically installing npm dependent packages can be solved by arranging the installation abnormality solving module 4, and the success rate and the efficiency of automatic installation are improved.
In some of these embodiments, the installation anomaly resolution module 4 may further include:
An abnormal error reporting information uploading unit 41 for uploading the abnormal error reporting information to the abnormal database when the abnormal error reporting information fails to match with the abnormal database;
A solution acquisition unit 42 for performing desensitization processing on the abnormal error reporting information and issuing 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 reporting ID, exception reporting details, description, node version, npm version, npm package information, operating system information, and solutions, and the exception reporting information is matched with the exception database by sql language according to the exception reporting details, description, node version, npm version, npm package information, and operating system information, and the corresponding solutions are found and returned.
In some embodiments, a code pulling judging module is further connected between the initialization configuration module and the node version judging module, and the code pulling judging module performs front-end code pulling or code merging through a git tool, judges whether the code pulling is finished or whether the code merging is finished according to callback information, and automatically executes NPM INSTALL after the code pulling is finished.
The above-described respective modules may be functional modules or program modules, and may be implemented by software or hardware. For modules implemented in hardware, the various modules described above may be located in the same processor; or the above modules may be located in different processors in any combination.
In addition, the method of automated processing npm dependent on package installation of embodiments of the present application described in connection with FIG. 1 may be implemented by a computer device. Fig. 5 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present application.
The computer device may include a processor 81 and a memory 82 storing computer program instructions.
In particular, the processor 81 may include a Central Processing Unit (CPU), or an Application SPECIFIC INTEGRATED Circuit (ASIC), or may be configured as one or more integrated circuits that implement 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 comprise a hard disk drive (HARD DISK DRIVE, abbreviated HDD), floppy disk drive, solid state drive (solid STATE DRIVE, abbreviated SSD), flash memory, optical disk, magneto-optical disk, magnetic tape, or universal serial bus (Universal Serial Bus, abbreviated USB) drive, or a combination of two or more of these. The 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 (Random Access Memory, RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-only memory, abbreviated PROM), an erasable PROM (Erasable Programmable Read-only memory, abbreviated EPROM), an electrically erasable PROM (ELECTRICALLY ERASABLE PROGRAMMABLE READ-only memory, abbreviated EEPROM), an electrically rewritable ROM (ELECTRICALLY ALTERABLE READ-only memory, abbreviated EAROM), or a FLASH memory (FLASH), or a combination of two or more of these. The RAM may be a static random-access memory (SRAM) or a dynamic random-access memory (Dynamic Random Access Memory DRAM), where the DRAM may be a fast page mode dynamic random-access memory (Fast Page Mode Dynamic Random Access Memory, FPMDRAM), an extended data output dynamic random-access memory (Extended Date Out Dynamic Random Access Memory, EDODRAM), a synchronous dynamic random-access memory (Synchronous Dynamic Random-access memory, SDRAM), or the like, as appropriate.
Memory 82 may be used to store or cache various data files that need to be processed and/or communicated, as well as possible computer program instructions for execution by processor 81.
The processor 81 reads and executes the computer program instructions stored in the memory 82 to implement any of the automated process npm packet-dependent method of installing in accordance with the above-described embodiments.
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 to each other through the bus 80 and perform communication with each other.
The communication interface 83 is used to enable communication between modules, devices, units and/or units in embodiments of the application. Communication port 83 may also enable communication with other components such as: and the external equipment, the image/data acquisition equipment, the database, the external storage, the image/data processing workstation and the like are used for data communication.
Bus 80 includes hardware, software, or both, coupling components of the computer device to each other. Bus 80 includes, but is not limited to, at least one of: data Bus (Data Bus), address Bus (Address Bus), control Bus (Control Bus), expansion Bus (Expansion Bus), local Bus (Local Bus). By way of example, and not limitation, bus 80 may include a graphics acceleration interface (ACCELERATED GRAPHICS Port, abbreviated as AGP) or other graphics bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, a front side bus (front side bus, abbreviated as FSB), a HyperTransport (abbreviated as HT) interconnect, an industry standard architecture (Industry Standard Architecture, abbreviated as ISA) bus, a wireless bandwidth (InfiniBand) interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel architecture (Micro Channel Architecture, abbreviated as MCA) bus, a peripheral component interconnect (PERIPHERAL COMPONENT INTERCONNECT, abbreviated as PCI) bus, a PCI-express (PCI-X) bus, a serial advanced technology attachment (SERIAL ADVANCED Technology Attachment, abbreviated as SATA) bus, a video electronics standards Association local (Video Electronics Standards Association Local Bus, abbreviated as 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 embodiments of the application have been described and illustrated with respect to a particular bus, the application contemplates any suitable bus or interconnect.
The computer device may perform the method of automated process npm dependent package installation in embodiments of the present application based on the acquired npm dependent package installation required related configuration, thereby implementing the method of automated process npm dependent package installation described in connection with fig. 1.
In addition, in connection with the automated process npm-dependent package installation method of the above-described embodiments, embodiments of the present application may be implemented by providing a computer-readable storage medium. The computer readable storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement a method of automated processing npm-dependent packet installation in any of the above embodiments.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (4)

1. A method for automated processing npm of packet-dependent installations, comprising the steps of:
A configuration initialization step of initializing npm related configurations required for automatic installation of the dependent package;
A code pulling judging step, namely carrying out front-end code pulling or code merging through a git tool, judging whether the code pulling is finished or whether the code merging is finished according to callback information, and automatically executing NPM INSTALL after the code pulling is finished;
A version judging step of judging whether the node version is correct or not, if so, installing and designating the node version according to the corresponding prompt;
npm a dependent package installation step, when the node version is correct, reading and downloading a source image according to the related configuration, and installing the npm dependent package accordingly;
an installation abnormality solving step of automatically generating an abnormality error reporting message to be matched with an abnormality database when an installation abnormality occurs, and obtaining a corresponding solution to complete the installation of npm dependent packages, the installation abnormality solving step further comprising the steps of:
An abnormal error reporting information uploading step, namely uploading the abnormal error reporting information to the abnormal database when the abnormal error reporting information fails to be matched with the abnormal database;
a solution obtaining step, namely performing desensitization processing on the abnormal error reporting information, and releasing the abnormal error reporting information to a solution collection platform to obtain a solution, wherein the abnormal database comprises an abnormal error reporting ID, abnormal error reporting detailed information, description, node version, npm version, npm package information, operating system information and a solution, and the abnormal error reporting information is matched with the abnormal database through sql language according to the abnormal error reporting detailed information, the description, the node version, the npm version, the npm package information and the operating system information, and searches and returns a corresponding solution;
and updating the abnormal database, namely updating the solution to the abnormal database.
2. The method of automated processing npm-dependent package installation according to claim 1, wherein the relevant configuration includes data source mirroring, installation mode, database configuration, and whether exception reporting is enabled.
3. A system for automated processing npm dependent on package installation, comprising:
a configuration initialization module for initializing npm related configurations required for automatic installation of the dependent package;
The code pulling judging module is used for carrying out front-end code pulling or code merging through a git tool, judging whether the code pulling is finished or whether the code merging is finished according to callback information, and automatically executing NPM INSTALL after the code pulling is finished;
the version judging module is used for judging whether the node version is correct or not, and if the node version is incorrect, installing and designating the node version according to the corresponding prompt;
npm dependent package installation module, when the node version is correct, reading and downloading a source image according to the related configuration, and installing the npm dependent package according to the source image;
And when the installation abnormality occurs, the installation abnormality solving module automatically generates abnormality error reporting information to be matched with an abnormality database, and obtains a corresponding solution to complete the installation of the npm dependent package, and the installation abnormality solving module further comprises:
An abnormal error reporting information uploading unit, configured to upload the abnormal error reporting information to the abnormal database when the abnormal error reporting information fails to match with the abnormal database;
the solution acquisition unit is used for carrying out desensitization processing on the abnormal error reporting information and issuing the abnormal error reporting information to a solution collection platform to acquire a solution, wherein the abnormal database comprises an abnormal error reporting ID, abnormal error reporting detailed information, description, node version, npm version, npm package information, operating system information and the solution, and the abnormal error reporting information is matched with the abnormal database through sql language according to the abnormal error reporting detailed information, the description, the node version, the npm version, the npm package information and the operating system information, and searches and returns the corresponding solution;
and the abnormal database updating unit is used for updating the solution to the abnormal database.
4. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the automated process npm-dependent packet-installation method of claim 1 or 2 when the computer program is executed by the processor.
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 CN112527335A (en) 2021-03-19
CN112527335B true 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)

Families Citing this family (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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7996497B2 (en) * 2008-06-30 2011-08-09 International Business Machines Corporation Method of handling duplicate or invalid node controller IDs in a distributed service processor environment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
Investigating The Reproducibility of NPM Packages;P. Goswami 等;《2020 IEEE International Conference on Software Maintenance and Evolution (ICSME)》;20201102;677-681 *
基于Socket.io+Node.js+Redis构建高效即时通讯系统;黄经赢 等;《现代计算机(专业版)》;20140827(第13期);62-64, 69 *

Also Published As

Publication number Publication date
CN112527335A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
KR101921052B1 (en) Method and apparatus for identifying security vulnerability and cause point thereof of executable binaries
US20150269060A1 (en) Development tools for logging and analyzing software bugs
CN107145437B (en) Java annotation test method and device
EP3605366A1 (en) Method and apparatus thereof used in engineering for checking deduction of components in bim modeling
US10579513B2 (en) Test run control method and apparatus
CN109815141B (en) Test method and device
US10261773B2 (en) Information processing device, information processing method, and computer readable medium
CN109471634A (en) The inspection method and equipment of source code format
CN112149136A (en) loT device firmware vulnerability detection method and system and electronic device
CN112527335B (en) Method, system and computer device for automated processing npm dependent package installation
CN111615688A (en) Assertion verification code binding method and device
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN114117973A (en) Logic synthesis method, device and storage medium
CN108628733B (en) Method and device for testing batch service processing operation
CN114185571A (en) Firmware upgrading method and device of CPLD, terminal and readable storage medium
CN111566617A (en) Firmware upgrading method and device for unmanned aerial vehicle, control device, unmanned aerial vehicle and medium
CN109684205B (en) System testing method, device, electronic equipment and storage medium
KR20190055776A (en) Method and apparatus for identifying security vulnerability and cause point thereof of executable binaries
CN109408063B (en) Instruction pile inserting method and device based on virtual machine
CN108614704B (en) Code compiling method and device
US9372949B1 (en) Guided exploration of circuit design states
CN110442370B (en) Test case query method and device
CN113535338A (en) Interaction method, system, storage medium and electronic device for data access
CN115221030A (en) Application testing method and device, electronic equipment and storage medium
CN113742224A (en) Test system, method, device, computer equipment and storage medium

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