NutzCN Logo
问答 nutzwk vue分支部署问题
发布于 2773天前 作者 qq_a3c9de83 2641 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk
E:\Vue\NutzWk-vue\src\vue-admin>npm i
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

E:\Vue\NutzWk-vue\src\vue-admin>npm run build

> vue-admin@0.0.1 build E:\Vue\NutzWk-vue\src\vue-admin
> node build/build.js

\ building for production...
Starting to optimize CSS...
Processing assets/css/app.d41d8cd98f00b204e9800998ecf8427e.css...
Processed assets/css/app.d41d8cd98f00b204e9800998ecf8427e.css, before: 68, after: 0, ratio: 0%
E:\Vue\NutzWk-vue\src\vue-admin\build\build.js:20
    if (err) throw err
             ^

Error: EMFILE: too many open files, open 'E:\Vue\NutzWk-vue\src\main\webapp\assets\vendor\bootstrap\bower.json'
    at Error (native)
 npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-admin@0.0.1 build: `node build/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-admin@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Eden\AppData\Roaming\npm-cache\_logs\2017-05-19T02_59_07_070Z-debug.log
6 回复

日志:

0 info it worked if it ends with ok
1 verbose cli [ 'E:\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Eden\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build' ]
2 info using npm@4.6.1
3 info using node@v4.4.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle vue-admin@0.0.1~prebuild: vue-admin@0.0.1
6 silly lifecycle vue-admin@0.0.1~prebuild: no script for prebuild, continuing
7 info lifecycle vue-admin@0.0.1~build: vue-admin@0.0.1
8 verbose lifecycle vue-admin@0.0.1~build: unsafe-perm in lifecycle true
9 verbose lifecycle vue-admin@0.0.1~build: PATH: C:\Users\Eden\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;E:\Vue\NutzWk-vue\src\vue-admin\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;E:\Java\apache-maven-3.3.9\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit;C:\Program Files (x86)\Skype\Phone\;F:\jdk8\jdk1.8.0_121\bin;E:\nodejs\;C:\Users\Eden\AppData\Roaming\npm
10 verbose lifecycle vue-admin@0.0.1~build: CWD: E:\Vue\NutzWk-vue\src\vue-admin
11 silly lifecycle vue-admin@0.0.1~build: Args: [ '/d /s /c', 'node build/build.js' ]
12 silly lifecycle vue-admin@0.0.1~build: Returned: code: 1  signal: null
13 info lifecycle vue-admin@0.0.1~build: Failed to exec build script
14 verbose stack Error: vue-admin@0.0.1 build: `node build/build.js`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Users\Eden\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at EventEmitter.emit (events.js:172:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Users\Eden\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at ChildProcess.emit (events.js:172:7)
14 verbose stack     at maybeClose (internal/child_process.js:827:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid vue-admin@0.0.1
16 verbose cwd E:\Vue\NutzWk-vue\src\vue-admin
17 verbose Windows_NT 10.0.10240
18 verbose argv "E:\\nodejs\\node.exe" "C:\\Users\\Eden\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
19 verbose node v4.4.3
20 verbose npm  v4.6.1
21 error code ELIFECYCLE
22 error errno 1
23 error vue-admin@0.0.1 build: `node build/build.js`
23 error Exit status 1
24 error Failed at the vue-admin@0.0.1 build script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

nodejs版本是啥

build.js贴一下

require('./check-versions')()

process.env.NODE_ENV = 'production'

var ora = require('ora')
var rm = require('rimraf')
var path = require('path')
var chalk = require('chalk')
var webpack = require('webpack')
var config = require('../config')
var webpackConfig = require('./webpack.prod.conf')

var spinner = ora('building for production...')
spinner.start()

rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
  if (err) throw err
  webpack(webpackConfig, function (err, stats) {
    spinner.stop()
    if (err) throw err
    process.stdout.write(stats.toString({
      colors: true,
      modules: false,
      children: false,
      chunks: false,
      chunkModules: false
    }) + '\n\n')

    console.log(chalk.cyan('  Build complete.\n'))
    console.log(chalk.yellow(
      '  Tip: built files are meant to be served over an HTTP server.\n' +
      '  Opening index.html over file:// won\'t work.\n'
    ))
  })
})

添加回复
请先登陆
回到顶部