Record errors every day
Recently, I took over a nuxtjs project, which was the secondary development bought by the company. I had a little side dishes and played a little foolishly, but it was solved.
When the project was to be delivered online two days ago, I found that I reported an error when running NPM run generate to package, but running build and dev were normal. The whole face was confused. I didn’t find a similar problem in Baidu for a long time. Then I had to go to the official problem of GitHub. It was all English, which made me feel numb. Finally, I really found that when generating applications, I will jump into the virtual Linux machine to obtain dist, that is, this problem may occur in the windows system, and then the Linux system obtains the path. Different from windows, it needs to standardize the path. The error is in the node_modules@nuxt\cli\dist\cli-generate.js
export async function snapshot ({ globbyOptions, ignore, rootDir }) {
const snapshot = {}
const files = await globby('**/*.*', {
...globbyOptions,
ignore,
cwd: rootDir,
absolute: true
})
Change cwd :rootDir
to cwd : upath . normalize ( rootDir )
.
const files = await globby__default [ 'default' ] ( '**/*.*' , {
... globbyOptions ,
ignore ,
cwd : upath . normalize ( rootDir ) ,
absolute : true
} ) ;
Read More:
- Vivado Error: [Chipscope 16-302]Could not generate core for dbg_hub.Aborting IP Generate operaion.The current Vivado temporary directory path.
- Error while trying to run project:unable to start debugging.the debugger is not properly installed. run setup to install or repa
- [Solved] Matlab Code generate error: failed to generate all binary outputs
- Puppeteer Error: Chromium revision is not downloaded. Run “npm install“ or “yarn install“
- Postgres uuid_generate_v1() does not exist [How to Solve]
- Tensorflow Run Error or the interface is stuck or report error: Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
- [Solved] Nuxt startup error: error: getaddrinfo enotfound 0
- [Solved] Mac M1 Debug Error: could not launch process: can not run under Rosetta
- [Solved] pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available
- AUC Error – ValueError: Data is not binary and pos_label is not specified
- [Solved] At least one of these environment variable is needed to run this program
- [Solved] Intellij IDEA Run Error: Command line is too long
- [Solved] – npm run dev Error: listen EADDRINUSE: address already in use :::8000(or 8080 etc.)
- Eslint Error:“Identifier xxx is not in camel case“
- Abnormal [System.InvalidOperationException: custom type mapping for ‘xxx’ is not specified or is not a solution
- HLS ERROR: [IMPL 213-28] Failed to generate IP. [How to Solve]
- [Solved] Git Run Error: Could not resolve host: github.com
- Gitlab Reconfigure is Stuck ruby_block[wait for redis service socket] action run
- How to Solve Archetype generate Error
- [Easy Solution] flutter Run Error: library “libflutter.so“ not found