大佬 在线等
Blizzard-liu opened this issue · 10 comments
大佬 中间层技术 server目录下面的文件也是前端做吗 感觉突然变复杂了
大佬这个项目启动不起来是什么原因呢?
大佬这个项目启动不起来是什么原因呢?
用 apinew 分支,npm run dev
使用的apinew 分支,报错
ERROR in ./.nuxt/client.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] D:\my\study\vuestudy\nuxt\nuxt-juejin-project.nuxt\client.js: Cannot find module 'D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@babel\compat-data\data\corejs3-shipped-proposals' (While processing: "D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@nuxt\babel-preset-app\src\index.js")
at createEsmNotFoundErr (internal/modules/cjs/loader.js:907:15)
at finalizeEsmResolution (internal/modules/cjs/loader.js:900:15)
at resolveExports (internal/modules/cjs/loader.js:432:14)
at Function.Module._findPath (internal/modules/cjs/loader.js:472:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@babel\preset-env\lib\polyfills\corejs3\usage-plugin.js:10:55)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@babel\preset-env\lib\index.js:29:44)
friendly-errors 10:04:43
@ multi eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&name=client&path=/__webpack_hmr/client ./.nuxt/client.js
解决了,下载了下缺少的文件调整了下版本
从入门到放弃
使用的apinew 分支,报错
ERROR in ./.nuxt/client.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] D:\my\study\vuestudy\nuxt\nuxt-juejin-project.nuxt\client.js: Cannot find module 'D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@babel\compat-data\data\corejs3-shipped-proposals' (While processing: "D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@nuxt\babel-preset-app\src\index.js")
at createEsmNotFoundErr (internal/modules/cjs/loader.js:907:15)
at finalizeEsmResolution (internal/modules/cjs/loader.js:900:15)
at resolveExports (internal/modules/cjs/loader.js:432:14)
at Function.Module._findPath (internal/modules/cjs/loader.js:472:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@babel\preset-env\lib\polyfills\corejs3\usage-plugin.js:10:55)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@babel\preset-env\lib\index.js:29:44)
friendly-errors 10:04:43
@ multi eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&name=client&path=/__webpack_hmr/client ./.nuxt/client.js解决了,下载了下缺少的文件调整了下版本
请问是调整了哪个版本,我现在跑起来也是有这个问题!
"devDependencies" 增加 "@babel/preset-env": "7.5.5",
"@babel/compat-data": "7.9.0",
"babel-loader": "^8.1.0",
使用的apinew 分支,报错
ERROR in ./.nuxt/client.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] D:\my\study\vuestudy\nuxt\nuxt-juejin-project.nuxt\client.js: Cannot find module 'D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@babel\compat-data\data\corejs3-shipped-proposals' (While processing: "D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@nuxt\babel-preset-app\src\index.js")
at createEsmNotFoundErr (internal/modules/cjs/loader.js:907:15)
at finalizeEsmResolution (internal/modules/cjs/loader.js:900:15)
at resolveExports (internal/modules/cjs/loader.js:432:14)
at Function.Module._findPath (internal/modules/cjs/loader.js:472:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@babel\preset-env\lib\polyfills\corejs3\usage-plugin.js:10:55)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (D:\my\study\vuestudy\nuxt\nuxt-juejin-project\node_modules@babel\preset-env\lib\index.js:29:44)
friendly-errors 10:04:43
@ multi eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&name=client&path=/__webpack_hmr/client ./.nuxt/client.js解决了,下载了下缺少的文件调整了下版本
请问是调整了哪个版本,我现在跑起来也是有这个问题!
npm i @babel/preset-env@7.12.17 -D 可完美解决,亲测有效!
可能还得加上这个~
npm install --save-dev node-sass sass-loader
还要把 sass 版本降级,否则一堆 deprecated 警告,参考:https://www.astralweb.com.tw/resolving-sass-deprecation-warning/