在初始化 npm install 了基本依赖后; npm run dev 报错:

 error  in ./server/index.js

Module build failed: Error: Plugin/Preset files are not allowed to export objects, only functions. In C:\Users\L\Desktop\Nuxt\nuxt-learn\node_modules\backpack-core\babel.js
at createDescriptor (C:\Users\L\Desktop\Nuxt\nuxt-learn\node_modules\@babel\core\lib\config\config-descriptors.js:178:11)
at C:\Users\L\Desktop\Nuxt\nuxt-learn\node_modules\@babel\core\lib\config\config-descriptors.js:109:50
at Array.map (<anonymous>)
at createDescriptors (C:\Users\L\Desktop\Nuxt\nuxt-learn\node_modules\@babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (C:\Users\L\Desktop\Nuxt\nuxt-learn\node_modules\@babel\core\lib\config\config-descriptors.js:101:10)
at C:\Users\L\Desktop\Nuxt\nuxt-learn\node_modules\@babel\core\lib\config\config-descriptors.js:58:96
at cachedFunction (C:\Users\L\Desktop\Nuxt\nuxt-learn\node_modules\@babel\core\lib\config\caching.js:32:19)
at presets (C:\Users\L\Desktop\Nuxt\nuxt-learn\node_modules\@babel\core\lib\config\config-descriptors.js:29:84)
at mergeChainOpts (C:\Users\L\Desktop\Nuxt\nuxt-learn\node_modules\@babel\core\lib\config\config-chain.js:320:26)
at C:\Users\L\Desktop\Nuxt\nuxt-learn\node_modules\@babel\core\lib\config\config-chain.js:283:7 internal/modules/cjs/loader.js:797
throw err;
^ Error: Cannot find module 'C:\Users\L\Desktop\Nuxt\nuxt-learn\build\main.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

初始化的 依赖中 版本都比较旧,只需将下面红色部分版本手动升级即可。

{
"name": "nuxt-learn",
"version": "1.1.0",
"description": "Nuxt.js project",
"author": "Xuhua <1729792587@qq.com>",
"private": true,
"scripts": {
"dev": "backpack dev",
"build": "nuxt build && backpack build",
"start": "cross-env NODE_ENV=production node build/main.js",
"precommit": "npm run lint",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore ."
},
"dependencies": {
"cross-env": "^5.0.1",
"koa": "^2.4.1",
"nuxt": "latest",
"source-map-support": "^0.4.15"
},
"devDependencies": {
"babel-eslint": "^7.1.1",
"backpack-core": "^0.8.4",
"eslint": "^3.19.0",
"eslint-config-standard": "^10.2.1",
"eslint-loader": "^2.1.1",
"eslint-plugin-html": "^2.0.3",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-node": "^4.2.2",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"nodemon": "^1.11.0",
"scmp": "^2.0.0"
}
}

nuxt.js 初始化 npm run dev 报错的更多相关文章

  1. vue项目初始化时npm run dev报错webpack-dev-server解决方法

    vue项目初始化时npm run dev报错webpack-dev-server解决方法 原因:这是新版webpack存在的BUG,卸载现有的新版本webpack,装老版本就好webpack-dev- ...

  2. 巨坑npm run dev 报错 终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build/css/add.p

    Windows10环境 npm run dev 报错  终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build ...

  3. npm run dev 报错 iview TypeError [ERR_INVALID_CALLBACK]: Callback must be a function

    运行npm run dev报这个错 然后找到 D:\text\vue\iview-admin\build\webpack.dev.config.js打开 将这一行代码: fs.write(fd, bu ...

  4. Vue 项目: npm run dev 报错 webpack-dev-server

    从码云上下载vue项目,运行npm run dev 时报错: > webpack-dev-server --inline --progress --config build/webpack.de ...

  5. npm run dev 报错:Error: Cannot find module 'webpack-cli/bin/config-yargs'

    使用 npm run dev 时报错: Error: Cannot find module 'webpack-cli/bin/config-yargs' 原因是找不到webpack-cli这个包,使用 ...

  6. vue.js环境配置步骤及npm run dev报错解决方案

    安装完成后,使用npm run dev 运行,成功后,就可以在浏览器中看到vue的欢迎画面了 最后一步可能报错,我就遇到这样的问题了, 个人问题仅供参考: ERROR Failed to compil ...

  7. vue npm run dev 报错 semver\semver.js:312 throw new TypeError('Invalid Version: ' + version)

    npm run dev运行报错信息如下图: 原因分析: 版本问题 解决办法: 在semver.js(node_modules/semver/semver.js)里做了一些改动,代码如下: // if ...

  8. vue项目npm run dev 报错error in ./src/main.js Module build failed: Error: Cannot find module 'babel-plugin-syntax-jsx'

    问题: vue 项目npm run dev运行时报错,如下图:  原因: 缺少相应的组件 解决办法: 安装相应组件: npm install babel-plugin-syntax-jsx --sav ...

  9. vue项目npm run dev 报错error in ./src/main.js Module build failed: ReferenceError: Unknown plugin "transform-vue-jsx" specified in......

    问题: vue项目npm run dev运行时报错,如下图:  原因: 缺少组件 解决办法: 安装相应的组件:  npm install babel-plugin-transform-vue-jsx ...

随机推荐

  1. iOS之Xcode提交App中断出现:Cannot proceed with delivery: an existing transporter instance is currently uploading this package

    https://www.jianshu.com/p/6d465a0ea58e 这句英文翻译过来就是: 无法继续交付:现有的传输程序实例目前正在上载此包 原因:上传的动作被记录在UploadToken中 ...

  2. 重新学习CSS,认识CSS3中的属性

    之前学css,觉得会改个样式就不错了,直到现在,在做前端开发的时候,才发现自己的前端页面是有多垃圾,而且还不知道该怎么适应各个浏览器,总是很“词穷”,最近是想着好久没去慕课上面了,于是就报着逛一逛的心 ...

  3. Pytorch本人疑问(2)model.train()和model.eval()的区别

    我们在训练时如果使用了BN层和Dropout层,我们需要对model进行标识: model.train():在训练时使用BN层和Dropout层,对模型进行更改. model.eval():在评价时将 ...

  4. 39 (guava包)AbstractScheduledService的使用

    package com.da.tool.guava; import com.google.common.util.concurrent.AbstractScheduledService; import ...

  5. listenTo - backbone.js

    listenToobject.listenTo(other, event, callback) 让 object 监听 另一个(other)对象上的一个特定事件.不使用other.on(event, ...

  6. 设计模式课程 设计模式精讲 14-2 组合模式coding

    1 代码演练 1.1 代码演练1(组合模式1) 1.2 代码演练2(组合模式1之完善) 1 代码演练 1.1 代码演练1(组合模式1) 需求: 打印出木木网的课程结构, 我们用一个组建类作为接口,课程 ...

  7. Redis有序集合类型

    命令 增加元素 ZADD score member [score member ...] > ZADD scoreboard 89 Tom 76 Peter 100 David (integer ...

  8. 三 基于Java动态数组手写队列

    手写队列: package dataStucture2.stackandqueue; import com.lt.datastructure.MaxHeap.Queue; import dataStu ...

  9. 吴裕雄--天生自然HADOOP操作实验学习笔记:pvuv统计案例理论

    实验目的 复习pv.uv的概念和原理 了解pv.uv的实际意义和获取方法 实验原理 前面我们已经基于mapreduce进行数据的etl处理,实验有很多不足之处,这次实验我们是基于url数据进行pv和u ...

  10. SSH Secure Shell 编码设置-----支持中文

    参考:https://www.cnblogs.com/hupf/p/6920323.html #vi /etc/sysconfig/i18n 将内容改为 LANG="zh_CN.GB1803 ...