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

Parcel unusable (throwing Error) #7621

Closed
BBE78 opened this issue Jan 29, 2022 · 4 comments · Fixed by #7797
Closed

Parcel unusable (throwing Error) #7621

BBE78 opened this issue Jan 29, 2022 · 4 comments · Fixed by #7797
Labels
🐛 Bug ✖️ Non-Parcel bug Bugs related to dependencies or plugins ✨ Parcel 2

Comments

@BBE78
Copy link

BBE78 commented Jan 29, 2022

🐛 bug report

Following the basic webapp installation described here : https://parceljs.org/getting-started/webapp/ parcel systematically throwing an error

🎛 Configuration (.babelrc, package.json, cli command)

Only 2 files needed to reproduce the issue:

package.json

{
  "name": "test",
  "version": "1.0.0",
  "license": "MIT",
  "scripts": {
    "build": "parcel build src/index.html",
    "start": "parcel src/index.html"
  },
  "devDependencies": {
    "parcel": "^2.2.1"
  }
}

src/index.html

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>My First Parcel App</title>
  </head>
  <body>
    <h1>Hello, World!</h1>
  </body>
</html>

🤔 Expected Behavior

yarn start should start with Parcel
yarn build should build with Parcel

😯 Current Behavior

Both yarn start and yarn build are throwing the following error:

$ parcel src/index.html
Error: Le chemin d�acc�s sp�cifi� est introuvable.

    at Object.open (C:\Users\Benoît\Documents\GitHub\sample-react-ts-parcel\essai\node_modules\lmdb\dist\index.cjs:1854:3)
    at new LMDBCache (C:\Users\Benoît\Documents\GitHub\sample-react-ts-parcel\essai\node_modules\@parcel\cache\lib\LMDBCache.js:69:34)
    at resolveOptions (C:\Users\Benoît\Documents\GitHub\sample-react-ts-parcel\essai\node_modules\@parcel\core\lib\resolveOptions.js:112:168)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Parcel._init (C:\Users\Benoît\Documents\GitHub\sample-react-ts-parcel\essai\node_modules\@parcel\core\lib\Parcel.js:218:27)
    at async Parcel.watch (C:\Users\Benoît\Documents\GitHub\sample-react-ts-parcel\essai\node_modules\@parcel\core\lib\Parcel.js:315:7)
    at async run (C:\Users\Benoît\Documents\GitHub\sample-react-ts-parcel\essai\node_modules\parcel\lib\cli.js:349:9) {
  code: 3
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

💁 Possible Solution

yarn start seems to be working when removing the folder node_modules\@parcel\cache\node_modules

$ parcel src/index.html
Server running at http://localhost:1234
√ Built in 1.36s

yarn build still throwing an error :

yarn run v1.22.17
$ parcel build src/index.html
√ Built in 3.65s

dist\index.html    144 B    1.87s
[Error: Error opening directory]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

🔦 Context

I'm trying to use Parcel in a big project (using WebPack) and verify performance improvments

💻 Code Sample

Only 2 files needed to reproduce the issue (see previous section)

🌍 Your Environment

Software Version(s)
Parcel v2.2.1
Node v16.13.1
npm/Yarn v1.22.17
Operating System Windows 10 64 bits
@devongovett
Copy link
Member

Possibly a permissions issue? Parcel needs to write to the .parcel-cache folder within your project, but from the error message it seems like the OS is not allowing that. Make sure the permissions are right on your directory.

@BBE78
Copy link
Author

BBE78 commented Jan 31, 2022

Hi, i have "write" permission on that folder...

@mischnic
Copy link
Member

mischnic commented Mar 3, 2022

î is the problem ... see kriszyp/lmdb-js#144

$ parcel src/index.html

By the way, this usually invokes a global install of Parcel, not what you specified in the project.

@BBE78
Copy link
Author

BBE78 commented Mar 6, 2022

î is the problem ... see DoctorEvidence/lmdb-js#144

$ parcel src/index.html

By the way, this usually invokes a global install of Parcel, not what you specified in the project.

Sounds good !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug ✖️ Non-Parcel bug Bugs related to dependencies or plugins ✨ Parcel 2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants