teadocs / pandas-cn

Pandas中文文档,欢迎贡献!
https://www.pypandas.cn/
927 stars 306 forks source link

编译bug patch/file/util文件夹不存在 #65

Open cgjue opened 4 years ago

cgjue commented 4 years ago

(undefined) ./patch/file/Comment.vue?vue&type=script&lang=js& (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/cache-loader/dist/cjs.js??ref--3-0!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/babel-loader/lib??ref--3-1!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/cache-loader/dist/cjs.js??ref--0-0!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/vue-loader/lib??vue-loader-options!./patch/file/Comment.vue?vue&type=script&lang=js&) Module not found: Error: Can't resolve './util' in '/home/jue/workspace/numpy-cn/patch/file' resolve './util' in '/home/jue/workspace/numpy-cn/patch/file' using description file: /home/jue/workspace/numpy-cn/package.json (relative path: ./patch/file) Field 'browser' doesn't contain a valid alias configuration using description file: /home/jue/workspace/numpy-cn/package.json (relative path: ./patch/file/util) no extension Field 'browser' doesn't contain a valid alias configuration /home/jue/workspace/numpy-cn/patch/file/util doesn't exist .js Field 'browser' doesn't contain a valid alias configuration /home/jue/workspace/numpy-cn/patch/file/util.js doesn't exist .jsx Field 'browser' doesn't contain a valid alias configuration /home/jue/workspace/numpy-cn/patch/file/util.jsx doesn't exist .vue Field 'browser' doesn't contain a valid alias configuration /home/jue/workspace/numpy-cn/patch/file/util.vue doesn't exist .json Field 'browser' doesn't contain a valid alias configuration /home/jue/workspace/numpy-cn/patch/file/util.json doesn't exist .styl Field 'browser' doesn't contain a valid alias configuration /home/jue/workspace/numpy-cn/patch/file/util.styl doesn't exist as directory /home/jue/workspace/numpy-cn/patch/file/util doesn't exist [/home/jue/workspace/numpy-cn/patch/file/util] [/home/jue/workspace/numpy-cn/patch/file/util.js] [/home/jue/workspace/numpy-cn/patch/file/util.jsx] [/home/jue/workspace/numpy-cn/patch/file/util.vue] [/home/jue/workspace/numpy-cn/patch/file/util.json] [/home/jue/workspace/numpy-cn/patch/file/util.styl] @ ./patch/file/Comment.vue?vue&type=script&lang=js& (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/cache-loader/dist/cjs.js??ref--3-0!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/babel-loader/lib??ref--3-1!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/cache-loader/dist/cjs.js??ref--0-0!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/vue-loader/lib??vue-loader-options!./patch/file/Comment.vue?vue&type=script&lang=js&) 19:0-60 59:13-21 69:13-21 101:13-21 111:13-21 @ ./patch/file/Comment.vue?vue&type=script&lang=js& @ ./patch/file/Comment.vue @ /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/@vuepress/core/.temp/internal/page-components.js @ /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/client/util.js @ /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/client/app.js @ /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/client/clientEntry.js @ multi /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/client/clientEntry.js (undefined) ./patch/file/Comment.vue?vue&type=script&lang=js& (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/cache-loader/dist/cjs.js??ref--3-0!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/babel-loader/lib??ref--3-1!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/cache-loader/dist/cjs.js??ref--0-0!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/vue-loader/lib??vue-loader-options!./patch/file/Comment.vue?vue&type=script&lang=js&) Module not found: Error: Can't resolve './util' in '/home/jue/workspace/numpy-cn/patch/file' resolve './util' in '/home/jue/workspace/numpy-cn/patch/file' using description file: /home/jue/workspace/numpy-cn/package.json (relative path: ./patch/file) using description file: /home/jue/workspace/numpy-cn/package.json (relative path: ./patch/file/util) no extension /home/jue/workspace/numpy-cn/patch/file/util doesn't exist .js /home/jue/workspace/numpy-cn/patch/file/util.js doesn't exist .jsx /home/jue/workspace/numpy-cn/patch/file/util.jsx doesn't exist .vue /home/jue/workspace/numpy-cn/patch/file/util.vue doesn't exist .json /home/jue/workspace/numpy-cn/patch/file/util.json doesn't exist .styl /home/jue/workspace/numpy-cn/patch/file/util.styl doesn't exist as directory /home/jue/workspace/numpy-cn/patch/file/util doesn't exist [/home/jue/workspace/numpy-cn/patch/file/util] [/home/jue/workspace/numpy-cn/patch/file/util.js] [/home/jue/workspace/numpy-cn/patch/file/util.jsx] [/home/jue/workspace/numpy-cn/patch/file/util.vue] [/home/jue/workspace/numpy-cn/patch/file/util.json] [/home/jue/workspace/numpy-cn/patch/file/util.styl] @ ./patch/file/Comment.vue?vue&type=script&lang=js& (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/cache-loader/dist/cjs.js??ref--3-0!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/babel-loader/lib??ref--3-1!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/cache-loader/dist/cjs.js??ref--0-0!/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/vue-loader/lib??vue-loader-options!./patch/file/Comment.vue?vue&type=script&lang=js&) 19:0-60 59:13-21 69:13-21 101:13-21 111:13-21 @ ./patch/file/Comment.vue?vue&type=script&lang=js& @ ./patch/file/Comment.vue @ /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/@vuepress/core/.temp/internal/page-components.js @ /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/client/util.js @ /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/client/app.js @ /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/client/serverEntry.js @ multi /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/client/serverEntry.js Error: Failed to compile with errors. at /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/node/build/index.js:186:16 at finalCallback (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/webpack/lib/MultiCompiler.js:254:12) at /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/webpack/lib/MultiCompiler.js:277:6 at done (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/neo-async/async.js:2931:13) at runCompilers (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/webpack/lib/MultiCompiler.js:181:48) at /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/webpack/lib/MultiCompiler.js:188:7 at /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/webpack/lib/MultiCompiler.js:270:7 at finalCallback (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/webpack/lib/Compiler.js:257:39) at /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/webpack/lib/Compiler.js:273:13 at AsyncSeriesHook.eval [as callAsync] (eval at create (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/tapable/lib/HookCodeFactory.js:33:10), :33:1) at AsyncSeriesHook.lazyCompileHook (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/tapable/lib/Hook.js:154:20) at onCompiled (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/webpack/lib/Compiler.js:271:21) at /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/webpack/lib/Compiler.js:681:15 at AsyncSeriesHook.eval [as callAsync] (eval at create (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) at AsyncSeriesHook.lazyCompileHook (/srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/tapable/lib/Hook.js:154:20) at /srv/node-v12.13.0-linux-x64/lib/node_modules/vuepress/node_modules/webpack/lib/Compiler.js:678:31

lisniuse commented 4 years ago

由于部分的依赖包有bug, 所以在项目初始化之前,请先进入 patch 目录下,然后执行 node index.js 安装临时补丁之后再运行 npm run dev 启动项目。

cgjue commented 4 years ago

由于部分的依赖包有bug, 所以在项目初始化之前,请先进入 patch 目录下,然后执行 node index.js 安装临时补丁之后再运行 npm run dev 启动项目。

jue@lalala:~/workspace/pandas-cn/patch$ node index.js targetFile /home/jue/workspace/pandas-cn/node_modules/vuepress-plugin-comment/Comment.vue internal/fs/utils.js:220 throw err; ^

Error: ENOENT: no such file or directory, open '/home/jue/workspace/pandas-cn/node_modules/vuepress-plugin-comment/Comment.vue' at Object.openSync (fs.js:440:3) at Object.writeFileSync (fs.js:1265:35) at Object. (/home/jue/workspace/pandas-cn/patch/index.js:34:6) at Module._compile (internal/modules/cjs/loader.js:956:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10) at Module.load (internal/modules/cjs/loader.js:812:32) at Function.Module._load (internal/modules/cjs/loader.js:724:14) at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10) at internal/main/run_main_module.js:17:11 { errno: -2, syscall: 'open', code: 'ENOENT', path: '/home/jue/workspace/pandas-cn/node_modules/vuepress-plugin-comment/Comment.vue' }

lisniuse commented 4 years ago

要先更新一下依赖的版本,运行一下 npm install

cgjue commented 4 years ago

按您提供的方法试了,问题在于patch/file/目录下没有util文件,所以一直报相同的错误