Comments (12)
http://github.com/ant-design/ant-design 慢速 clone 中
from npminstall.
@afc163 node_modules/.0.3.7@orchestrator/index.js:154
抛了异常,err 竟然是数字 1
... 不知道什么情况。通过 ./node_modules/.bin/antd-tools run guard
运行可以重现。
} else if (err && !this.listeners('err').length) {
// No one is listening for the error so speak louder
console.log('err:', err, typeof err, JSON.stringify(err));
throw err;
}
from npminstall.
antd-tools 依赖了 process.env.npm_config_argv
导致的。https://github.com/ant-design/antd-tools/blob/master/lib/utils/get-npm-args.js#L8 和 https://github.com/ant-design/antd-tools/blob/master/lib/gulpfile.js#L210
我去看看 npm_config_argv 环境变量的定义。
from npminstall.
+1
from npminstall.
process.env.npm_config_argv {"remain":[],"cooked":["run","prepublish"],"original":["run","prepublish"]}
from npminstall.
使用的是这个模块 nopt https://github.com/npm/nopt/blob/10a750c9bb99c1950160353459e733ac2aa18cb6/lib/nopt.js#L43
from npminstall.
- https://github.com/npm/npm/blob/9e03561547ec5830c5f61caa4e6221d4d3b813aa/bin/npm-cli.js#L42
- https://github.com/npm/npm/blob/master/lib/config/defaults.js#L226
var conf = nopt(types, shorthands)
npm.argv = conf.argv.remain
定义太多,我还是简单模拟一下 nopt 好了。
from npminstall.
npm 连 argv 都搞这么复杂。。。
from npminstall.
现在依然报错
npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "run" "dist" npm ERR! node v7.4.0 npm ERR! npm v4.0.5 npm ERR! code ELIFECYCLE npm ERR! [email protected] dist:
antd-tools run dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dist script 'antd-tools run dist'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the antd package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! antd-tools run dist
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs antd
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls antd
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\test\ant-design\npm-debug.log
`
from npminstall.
@fhqdgv cnpm -v 显示的是什么版本呢?怎样重现?
from npminstall.
@fhqdgv ant-design/ant-design#3143 (comment) 测试没问题的
from npminstall.
谢谢回复 应该不是cnpm问题,刚试了直接npm install也是同样的问题,可能是windows的原因
npm run dist后报错Error: spawn atool-build ENOENT
然后改了
`function runCmd(cmd, _args, fn) {
const args = _args || [];
const runner = require('child_process').spawn('cmd', ['/s', '/c', cmd, '-o', 'short'], args, {
// keep color
stdio: 'inherit',
env: getRunCmdEnv(),
});
// const runner = require('child_process').spawn(cmd, args, {
// // keep color
// stdio: 'inherit',
// env: getRunCmdEnv(),
// });
runner.on('close', (code) => {
if (fn) {
fn(code);
}
});
}`
再npm run dist才报的这个错npm ERR! Exit status 1
from npminstall.
Related Issues (20)
- 错误码改造
- 不支持读取.npmrc配置 HOT 5
- RFC: npminstall rapid install 模式的优化 HOT 1
- 支持去幽灵依赖安装模式 HOT 1
- support peerDependenciesMeta HOT 2
- 生成的 bin 文件需要注入 NODE_PATH HOT 3
- 幽灵依赖实在太多,得遵循 pnpm 的兜底 node_modules 行为
- Symbolic links don't work in windows
- anti semver 提示需要改进
- npminstall 只能在commonjs规范项目中使用么 HOT 2
- 给 semver 加一个缓存 HOT 6
- support offline mode
- run scripts on background
- 在linux下安装nice-napi报错
- Take a look at `clonefile`
- 使用rollup@rollup/plugin-commonjs插件,打包遇到npminstall()时解析报错 HOT 2
- [Bug] npminstall<latest> cannot be used with 14.17.3 node HOT 3
- cnpm安装依赖时npminstalll报错 HOT 1
- 打印各域名下的网络请求数 HOT 2
- cp .env.10 causas de morbilidad.env.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npminstall.