npm

Why does running npm test result in: '.' is not recognized as an internal or external command, operable program or batch file.?

ぐ巨炮叔叔 提交于 2021-02-07 09:17:56
问题 I have the following installed: Windows 10 Git bash (mingw64) Node.js v8.7.0 npm version 5.4.2 Packages: chai 4.4.1 mocha 3.5.0 I have a sample mocha test that will always pass when it actually runs. The command I'm running in my shell: npm test Output: ./node_modules/mocha/bin/_mocha '.' is not recognized as an internal or external command, operable program or batch file. npm ERR! Test failed. See above for more details. For some reason I'm able to run this command directly: ./node_modules

EPERM: operation not permitted, unlink 'C:\Users\**\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node'

三世轮回 提交于 2021-02-07 06:34:35
问题 When I run "npm install", I get an error. OS: Windows 10 npm: 6.2.0 node: v10.9.0 I already tried to "npm install" after "npm cache verify" but I couldn't solved it. npm cache verify npm instal npm ERR! path C:\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding.node npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall unlink npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor

npm does not support Node.js v9.0.0

亡梦爱人 提交于 2021-02-07 04:55:11
问题 I just upgraded my project to use Node.js v9.0.0. When I start my project using npm, it tells me I should upgrade to a newer Node version, but I believe this is the newest version. I also believe I'm on the newest version of npm (5.5.1). Do I need to worry about this warning? Is there a good way to resolve the issue? Here's the full warning: npm WARN npm npm does not support Node.js v9.0.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any

npm does not support Node.js v9.0.0

£可爱£侵袭症+ 提交于 2021-02-07 04:55:11
问题 I just upgraded my project to use Node.js v9.0.0. When I start my project using npm, it tells me I should upgrade to a newer Node version, but I believe this is the newest version. I also believe I'm on the newest version of npm (5.5.1). Do I need to worry about this warning? Is there a good way to resolve the issue? Here's the full warning: npm WARN npm npm does not support Node.js v9.0.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any

How to run `npm install` in Amazon Elastic Beanstalk with .ebextensions

☆樱花仙子☆ 提交于 2021-02-07 03:01:47
问题 I want to deploy my PHP app in a Amazon Elastic Beanstalk with eb deploy command. But my app use gulp to concat and minify scss and js. So I tried these commands to in the file .ebextensios/03npm.config commands: 01-install-node: command: "yum install nodejs npm --enablerepo=epel -y" container_commands: 01-install-dependencies: command: "npm install" 02-build: command: "npm run build" But in the end I receive this error [Instance: i-c7800103] Command failed on instance. Return code: 1 Output:

webpack3升级webpack4

不羁的心 提交于 2021-02-07 00:16:50
cnpm i webpck@4 webpack-cli -D cnpm i webpack-cli -D cnpm update npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. 删除 // "extract-text-webpack-plugin": "^3.0.2", cnpm install mini-css-extract-plugin -D //^0.8.0 升级 webpack-dev-server "webpack-dev-server": "^3.8.2" rm -rf node_modules rm package-lock.json npm cache clear --force npm install Error: webpack.optimize.CommonsChunkPlugin has

Can't use nvm from bash script

好久不见. 提交于 2021-02-06 15:28:42
问题 I am trying to write a shell script to automate my dev environment set-up (install python, nvm, node, mongo etc...). I am using nvm to install Node. It tells you to close and reopen your terminal to start using the nmv command. I tried to source .bashrc and .profile to make the command available right away so I can continue running the script with nvm install, but it doesn't work. Here is the segment of my script related to installing NVM / Node: #install nvm and latest node version #

Can't use nvm from bash script

时光毁灭记忆、已成空白 提交于 2021-02-06 15:27:31
问题 I am trying to write a shell script to automate my dev environment set-up (install python, nvm, node, mongo etc...). I am using nvm to install Node. It tells you to close and reopen your terminal to start using the nmv command. I tried to source .bashrc and .profile to make the command available right away so I can continue running the script with nvm install, but it doesn't work. Here is the segment of my script related to installing NVM / Node: #install nvm and latest node version #

Force yarn install instead of npm install for Node module?

流过昼夜 提交于 2021-02-06 15:13:28
问题 I want to force using yarn install instead of npm install . I want to raise error in npm install . What should I do in package.json ? 回答1: UPDATE: Alexander's answer is the better solution and uses the same technique I describe here. I am leaving my answer in tact for posterity. The original point of my answer was to show that you can execute a small node script which should work on all platforms. In your preinstall script you can run a mini node script which should work on all platforms,

升级webpack5过程中遇到的坑

℡╲_俬逩灬. 提交于 2021-02-06 14:33:32
将项目的weback从3升到了5,遇到了一系列的问题,这里记录两个: extract-text-webpack-plugin兼容问题 webpack-dev-server兼容问题 1.extract-text-webpack-plugin兼容问题 升到webpack5后,运行打包直接报错,如下: 原因是:webpack4以上的版本不再使用“extract-text-webpack-plugin”,应该改成用“mini-css-extract-plugin” 解决 原代码: const ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = { plugins: [ new ExtractTextPlugin({ filename:'[name].css', disable: false, allChunks: true }) ], module: { loaders: [ { test: /\.css$/, use: ExtractTextPlugin.extract({ fallback:'style-loader', use:'css-loader!less-loader' }) } ] } } 改为: const MiniCssExtractPlugin = require(