-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm run build 构建报错 #4583
Comments
@sorrycc 麻烦大神帮忙看看,谢谢。我试了几个umi版本都不可以。 |
upgrade v4 |
这个里面竟然有 fs,你导入了什么包? |
都是默认安装的,没有引入新的包。不只这个包会出现SyntaxError: Unexpected token ...错误,而且报错信息跟fs没关系呀。 |
暂时还不想升级到V4,o(╥﹏╥)o |
@wsdqr001 同一个问题的,你在浏览器里引入了 node 的包,所以就直接报错了 |
ERROR Failed to compile with 1 errors 14:40:18 This dependency was not found:
To install it, you can run: npm install --save @tmp/history npm ERR! A complete log of this run can be found in: |
这个是 umi 的问题。你升级所有的依赖到最新就可以了,看一下你的项目里是不是用 *.lock 文件 |
升级最新umi解决了这个问题,谢谢啦。 |
npm run build的时候还是报错了,报错信息如下: /app/work/git/turnover/virgo-web/node_modules/update-notifier/index.js:132 SyntaxError: Unexpected token ... |
node升级到V10解决问题,closed |
npm run build 时报错,node_modules下的多个包都有这个问题。怀疑是node_modules里,es6代码不能编译成es5代码导致。请问是需要手动配置webpack plugin来包含node_modules吗?错误信息如下:
/node_modules/consola/dist/consola.js:1
(function (exports, require, module, __filename, __dirname) { "use strict";function _interopDefault(u){return u&&"object"==typeof u&&"default"in u?u.default:u}var util=_interopDefault(require("util")),path=require("path"),fs=require("fs"),os=_interopDefault(require("os")),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(u,e){return u(e={exports:{}},e.exports),e.exports}function getCjsExportFromNamespace(u){return u&&u.default||u}var vendors=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTI
SyntaxError: Unexpected token ...
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ant-design-pro@2.3.1 build:
umi build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ant-design-pro@2.3.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
The text was updated successfully, but these errors were encountered: