巴扎黑2017-04-17 15:28:05
I can’t understand why you have such strange questions
1. Even one of your nodejs development teams cannot control the same version number? How can you still open a company if you can't even decide on a unified version number and don't allow yourself to upgrade?
2. The npm version number issue is the same as above
3. The packages installed by npm are not universal for different systems. Isn’t it possible to set the version numbers of all packages in one package.json, synchronize the code through version control methods such as git, and everyone can execute npm install to install it themselves? ?
I use mac, fedora, and win10 on the three development machines. Why do I always encounter any of the situations you mentioned?
Also, does your company use Mac and Linux for front-end development? How to do IE adaptation? Open a virtual machine? Oh hehehe, it’s not boring anymore
Also windows are anti-human, the ignorant are fearless. For front-end development, you need an IDE (such as webstorm, completely cross-platform) or editor (atom, vscode, vim, emacs, etc., also cross-platform), a browser (chrome, firefox cross-platform), and a few command lines Running scripts (npm scripts, node backend, also cross-platform), I don’t see any reason why not using windows when someone in the team must use windows
怪我咯2017-04-17 15:28:05
Thank you for the invitation~
Sorry, the company's entire front-end line is equipped with Mac Pro, and the entire design line is iMAC.
With all this time spent, it’s enough money to buy a computer for the programmer.
Secondly, node-sass does have a lot of problems. . . less You deserve it
Again, npm can also lock dependent versions, npm shrinkwrap
.
大家讲道理2017-04-17 15:28:05
npm force lock version, this is the simplest and violent method.
In fact, your problem is not only faced by the front end or node, but also by Linux development and PHP development (if you also use library control tools). It’s just that npm’s library is updated relatively quickly. The company used 1.0 when developing Vue, and when it was ready to be released, it was updated to 2.0 on npm. Almost everyone's code was scrapped. Most people have always copied and pasted it, and have no idea how to type the npm command line. They just copy and paste, so they have no idea what's going on. Only very traditional development languages such as C do not have this problem (but it is quite painful to dig out source code snippets on Debian every day)
Another more violent method is for the development leader to fix a node_modules directory himself and then distribute it to subordinate developers. The people below will use this directory directly without running npm themselves. However, this may still not solve the problem on Windows.
Docker or something like that is not recommended as it will lead to the problem of sharing the development environment. If npm cannot solve it, the problem of mixed development environments will be even greater.
I currently use the npm version lock method in my company. In addition, although I develop office windows, all files run on the local virtual machine CentOS, and there is no problem with long file names. Of course you can do this yourself, but it would be too difficult to ask others.
PHP中文网2017-04-17 15:28:05
Node/npm unified version should not be a problem; dependencies in package.json can also lock versions as needed.
What you said is a bit unclear: Why do your artists need to configure a development environment? Need to run code?