'Cannot run Parcel in my project (Parcel does not create dist with compiled file)
Please help me figure out the problem. I can not understand the essence of the error and how to fix it.
I initialize the project: npm init -y
Install Parcel: npm install --save-dev parcel
I create src directory with an index.html file.
When I run the npx parcel src/index.html command, I get an error:
Error: The filename, directory name, or volume label syntax is incorrect.
at Object.open (C:\Users\dell\OneDrive\Документи\Projects\Test\node_modules\lmdb\dist\index.cjs:1936:3) at new LMDBCache (C:\Users\dell\OneDrive\Документи\Projects\Test\node_modules@parcel\cache\lib\LMDBCache.js:69:34) at resolveOptions (C:\Users\dell\OneDrive\Документи\Projects\Test\node_modules@parcel\core\lib\resolveOptions.js:112:168) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Parcel._init (C:\Users\dell\OneDrive\Документи\Projects\Test\node_modules@parcel\core\lib\Parcel.js:218:27) at async Parcel.watch (C:\Users\dell\OneDrive\Документи\Projects\Test\node_modules@parcel\core\lib\Parcel.js:315:7) at async run (C:\Users\dell\OneDrive\Документи\Projects\Test\node_modules\parcel\lib\cli.js:349:9) { code: 123 }
Solution 1:[1]
I had the same issue. I resolved it by changing the line at node_modules@parcel\core\lib\resolveOptions.js:112:168 to
let cache = (_initialOptions$cache = initialOptions.cache) !== null && _initialOptions$cache !== void 0 ? _initialOptions$cache : new (_cache().FSCache)(outputFS, cacheDir);
Basically, I removed the
outputFS instanceof _fs().NodeFS ? new (_cache().LMDBCache)(cacheDir) : part of that line. For some unknown reason, there seems to be a problem with LMDBCache and Parcel.
Solution 2:[2]
You're missing the build command from npx parcel src/index.html:
Update to:
npx parcel build src/index.html.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dharman |
| Solution 2 | Sam |
