Skip to content
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

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

Open
cgjue opened this issue Nov 29, 2019 · 4 comments
Open

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

cgjue opened this issue Nov 29, 2019 · 4 comments

Comments

@cgjue
Copy link

cgjue commented Nov 29, 2019

(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
Copy link
Member

lisniuse commented Dec 1, 2019

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

@cgjue
Copy link
Author

cgjue commented Dec 1, 2019

由于部分的依赖包有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
Copy link
Member

lisniuse commented Dec 1, 2019

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

@cgjue
Copy link
Author

cgjue commented Dec 1, 2019

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

@cgjue cgjue changed the title 编译bug patch/file/utils文件夹不存在 编译bug patch/file/util文件夹不存在 Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants