编译报错

来源:5-1 Nuxt.js基础(1)

广招科技

2018-10-11

nuxt-learn@1.1.0 dev D:\heyinhuan的桌面\nuxt-learn
backpack dev

ERROR Failed to compile with 1 errors 18:02:22
error in ./server/index.js

Module build failed: Error: Plugin/Preset files are not allowed to export objects, only functions. In D:\heyinhuan的桌面\nuxt-learn\node_modules\backpack-core\babel.js
at createDescriptor (D:\heyinhuan的桌面\nuxt-learn\node_modules@babel\core\lib\config\config-descriptors.js:178:11)
at items.map (D:\heyinhuan的桌面\nuxt-learn\node_modules@babel\core\lib\config\config-descriptors.js:109:50)
at Array.map ()
at createDescriptors (D:\heyinhuan的桌面\nuxt-learn\node_modules@babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (D:\heyinhuan的桌面\nuxt-learn\node_modules@babel\core\lib\config\config-descriptors.js:101:10)
at passPerPreset (D:\heyinhuan的桌面\nuxt-learn\node_modules@babel\core\lib\config\config-descriptors.js:58:96)
at cachedFunction (D:\heyinhuan的桌面\nuxt-learn\node_modules@babel\core\lib\config\caching.js:33:19)
at presets.presets (D:\heyinhuan的桌面\nuxt-learn\node_modules@babel\core\lib\config\config-descriptors.js:29:84)
at mergeChainOpts (D:\heyinhuan的桌面\nuxt-learn\node_modules@babel\core\lib\config\config-chain.js:315:26)
at D:\heyinhuan的桌面\nuxt-learn\node_modules@babel\core\lib\config\config-chain.js:278:7

module.js:550
throw err;
^

Error: Cannot find module 'D:\heyinhuan的桌面\nuxt-learn\build\main.js’
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3

写回答

1回答

快乐动起来呀

2018-10-11

把nuxt降级到1.4.2

1
1
慕莱坞1975833
为什么降级后,还会有这个错误:$ npm run dev > test@1.1.0 dev C:\Users\Administrator\Desktop\ssr\test > backpack dev DONE Compiled successfully in 1337ms11:56:27 DONE Compiled successfully in -6839ms11:56:35 Server listening on 127.0.0.1:3000 Error: listen EADDRINUSE 127.0.0.1:3000 at Server.setupListenHandle [as _listen2] (net.js:1360:14) at listenInCluster (net.js:1401:12) at doListen (net.js:1510:7) at _combinedTickCallback (internal/process/next_tick.js:142:11) at process._tickCallback (internal/process/next_tick.js:181:9)
2018-10-15
共1条回复

Vue全家桶+SSR+Koa2全栈开发美团网

整合大前端8项技术,全面晋级全栈工程师,毕设/面试作品

2445 学习 · 1638 问题

查看课程