Comments (14)
I ran into a very similar issue and got around it by:
- adding
@parcel/watcher-linux-x64-glibc
intooptionalDependencies
inpackage.json
npm install -O @parcel/watcher-linux-x64-glibc
- running
npm dedupe
- 💰
from watcher.
Why is a filesystem watcher needed to do an one-shot build of a project?
from watcher.
ran into this same issue. @theprivileges solution worked for me. This was in a github action where I was having the issue.
from watcher.
I just had this issue except with
@parcel/watcher-linux-arm-glibc
using a Raspberry Pi 4 running Raspberry Pi OS, based on Debian Bullseye. I decided to try usingrequire
in the Node REPL to see if it works, and found a more descriptive error: couldn't find glibc 2.32. I checked my system and found I had glibc 2.31 available in the repos. One format to Ubuntu later and I had glibc ~2.37 available and the error is fixed.Some possibly helpful takeaways from my experience:
- It seems like the new
parcel/watcher
distribution system can fail with thisError: No prebuild or local build
error and squash a more descriptive error message- The new system depends on glibc 2.32, such that some stability-focused distros like Debian can't run it, so check the availability of your repos. Buster is before Bullseye, so you might be hit by the same issue. There may be something similar with musl.
- You might be able to get a more descriptive error message by using
require
on the package in question in the REPL or another dummy environment.Hope this helps you and/or someone else in the future!
I recently ran into a similar issue on a netlify container. We (temporarily) resolved it by manually adding '@parcel/watcher-linux-x64-glibc' as an optional dependency.
from watcher.
Facing the same issue with @parcel/watcher-linux-x64-musl package. Downgrade of parcel or watcher packages did not help
Solved the problem upgrading alpine from 3.15 to 3.18.
To reproduce the issue run commands below (the second one is failing)
docker run --rm -it node:18-alpine3.18 sh -c "yarn add parcel && echo 123 >> index.tsx && yarn parcel build index.tsx"
docker run --rm -it node:18-alpine3.15 sh -c "yarn add parcel && echo 123 >> index.tsx && yarn parcel build index.tsx"
from watcher.
` ERROR #11903 API.TYPESCRIPT.COMPILATION
There was an unhandled error during compilation for /. Please run the command with the --verbose flag again.
No prebuild or local build of @parcel/watcher found. Tried @parcel/watcher-linux-arm64-glibc. Please ensure it is installed (don't use --no-optional when installing with npm).
Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.
Error: No prebuild or local build of @parcel/watcher found. Tried @parcel/watcher-linux-arm64-glibc. Please ensure it is installed (don't use --no-optional when installing with
npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.
-
index.js:25 Object.
/node_modules/@parcel/watcher/index.js:25:13 -
loader:1112 Module._compile
node:internal/modules/cjs/loader:1112:14 -
loader:1166 Object.Module._extensions..js
node:internal/modules/cjs/loader:1166:10 -
loader:988 Module.load
node:internal/modules/cjs/loader:988:32 -
loader:834 Function.Module._load
node:internal/modules/cjs/loader:834:12 -
loader:1012 Module.require
node:internal/modules/cjs/loader:1012:19 -
helpers:102 require
node:internal/modules/cjs/helpers:102:18 -
index.js:7 Object.
/node_modules/@parcel/fs/lib/index.js:7:28 -
loader:1112 Module._compile
node:internal/modules/cjs/loader:1112:14 -
loader:1166 Object.Module._extensions..js
node:internal/modules/cjs/loader:1166:10 -
loader:988 Module.load
node:internal/modules/cjs/loader:988:32 -
loader:834 Function.Module._load
node:internal/modules/cjs/loader:834:12 -
loader:1012 Module.require
node:internal/modules/cjs/loader:1012:19 -
helpers:102 require
node:internal/modules/cjs/helpers:102:18 -
LMDBCache.js:49 _fs
/node_modules/@parcel/cache/lib/LMDBCache.js:49:16 -
LMDBCache.js:79 new LMDBCache
/node_modules/@parcel/cache/lib/LMDBCache.js:79:20
not finished compile gatsby files - 0.101s`
from watcher.
This package also allows detecting changes between one-shot builds: https://github.com/parcel-bundler/watcher#querying
from watcher.
The package exists https://www.npmjs.com/package/@parcel/watcher-linux-arm64-musl but for some reason (perhaps an npm bug) it may not have been installed properly? Try clearing your package-lock.json and deleting node modules and then re installing. npm/cli#4828
from watcher.
Can confirm the same thing as the topic starter.
Build log:
> [builder 5/5] RUN yarn build:
#0 0.501 yarn run v1.22.19
#0 0.553 $ yarn build:sdk && yarn build:hosted
#0 0.798 $ yarn workspace @novoic/storyteller build --log-level=warn
#0 1.365 $ parcel build src/index.tsx --log-level=warn
#0 1.688 Error: No prebuild or local build of @parcel/watcher found. Tried @parcel/watcher-linux-x64-musl. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.
#0 1.688 at Object.<anonymous> (/app/node_modules/@parcel/watcher/index.js:23:13)
#0 1.688 at Module._compile (node:internal/modules/cjs/loader:1159:14)
#0 1.688 at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
#0 1.688 at Module.load (node:internal/modules/cjs/loader:1037:32)
#0 1.688 at Module._load (node:internal/modules/cjs/loader:878:12)
#0 1.688 at Module.require (node:internal/modules/cjs/loader:1061:19)
#0 1.688 at require (node:internal/modules/cjs/helpers:103:18)
#0 1.688 at Object.<anonymous> (/app/node_modules/@parcel/fs/lib/index.js:7:28)
#0 1.688 at Module._compile (node:internal/modules/cjs/loader:1159:14)
#0 1.688 at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
#0 1.815 error Command failed with exit code 1.
#0 1.815 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#0 1.840 error Command failed.
#0 1.840 Exit code: 1
#0 1.840 Command: /usr/local/bin/node
#0 1.840 Arguments: /opt/yarn-v1.22.19/lib/cli.js build --log-level=warn
#0 1.840 Directory: /app/packages/storyteller
#0 1.840 Output:
#0 1.840
#0 1.841 info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
#0 1.867 error Command failed with exit code 1.
#0 1.867 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#0 1.893 error Command failed with exit code 1.
#0 1.893 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
Dockerfile:21
--------------------
19 | RUN yarn install
20 |
21 | >>> RUN yarn build
22 |
23 | FROM nginx:1.23.0-alpine
Used node:18-alpine3.15
as base image. Would appreciate any solutions. At this point it seems that downgrading is the only option
from watcher.
Did you follow the instructions in the error message? I can't do anything about npm/yarn not installing things properly. Things to try:
- Verify that the package actually does not exist in your node_modules
- Verify that you are not installing with
--no-optional
(npm) or--ignore-optional
(yarn) - Check that the missing package is listed in your lock file. If not, delete your lock file and
node_modules
and re-install.
from watcher.
I just had this issue except with @parcel/watcher-linux-arm-glibc
using a Raspberry Pi 4 running Raspberry Pi OS, based on Debian Bullseye.
I decided to try using require
in the Node REPL to see if it works, and found a more descriptive error: couldn't find glibc 2.32. I checked my system and found I had glibc 2.31 available in the repos. One format to Ubuntu later and I had glibc ~2.37 available and the error is fixed.
Some possibly helpful takeaways from my experience:
- It seems like the new
parcel/watcher
distribution system can fail with thisError: No prebuild or local build
error and squash a more descriptive error message - The new system depends on glibc 2.32, such that some stability-focused distros like Debian can't run it, so check the availability of your repos. Buster is before Bullseye, so you might be hit by the same issue. There may be something similar with musl.
- You might be able to get a more descriptive error message by using
require
on the package in question in the REPL or another dummy environment.
Hope this helps you and/or someone else in the future!
from watcher.
Just popped into the code and I found where the message is logged, and indeed parcel will simply log this message in a catch
block regardless of why the require
failed.
Maybe right off we could tweak the verbiage of the message to something like Error: Failed to load prebuild
, and beyond that maybe pass along messages from the caught error? From there it'll be much easier for users to diagnose whatever their own issue is.
from watcher.
Facing the same issue with @parcel/watcher-linux-x64-musl package. Downgrade of parcel or watcher packages did not help
from watcher.
I experienced this issue using the electron-forge typescript-webpack template trying to use @parcel/watcher
at runtime.
The error message reported the correct package name, however, inspecting the build output showed webpack was only interpreting the name to require as -glibc
instead of appending that to the existing name.
[electron] Error: Cannot find module '-glibc'
[electron] at webpackMissingModule (/home/shamsup/projects/electron-test/.webpack/main/index.js:27:82)
I am not familiar enough with webpack internals to explain why it misinterprets the require, but this patch resolved the issue (patch-package
):
diff --git a/node_modules/@parcel/watcher/index.js b/node_modules/@parcel/watcher/index.js
index 4929c54..64dd688 100644
--- a/node_modules/@parcel/watcher/index.js
+++ b/node_modules/@parcel/watcher/index.js
@@ -4,9 +4,9 @@ let name = `@parcel/watcher-${process.platform}-${process.arch}`;
if (process.platform === 'linux') {
const { MUSL, family } = require('detect-libc');
if (family === MUSL) {
- name += '-musl';
+ name = `@parcel/watcher-${process.platform}-${process.arch}-musl`;
} else {
- name += '-glibc';
+ name = `@parcel/watcher-${process.platform}-${process.arch}-glibc`;
}
}
from watcher.
Related Issues (20)
- Possible deadlocks with overlapping subscriptions HOT 1
- readme backend uses unclear HOT 1
- Crash when running in alpine podman container
- Second install fails if install with pnpm and node-linker=hoisted HOT 3
- Separate packages for precompiled binaries HOT 1
- @parcel/watcher not working with Docker node:alpine image HOT 3
- Watcher not reporting events when used in docker. HOT 2
- npm ci cannot locate a prebuild for any given architecture HOT 3
- v2.2.0 node-gyp rebuild error, incorrect scripts in npm registry HOT 11
- Specifying path to `watchman` executable HOT 1
- When using Watchman on Windows, a console window pops up when subscribing HOT 1
- gyp: binding.gyp not found (...) while trying to load binding.gyp HOT 33
- error when use node v18.18 on github runner images
- InotifyBackend hungs forever when inotify_init1 returns error HOT 1
- AWS Amplify build error HOT 2
- Github M1 Build Error sh: node-gyp-build: command not found HOT 1
- Change event is not emitted on Windows when continuously appending to an initially existing file
- when moving folder to a watched folder , only event for the moved folder is generated and not for files inside the folder HOT 2
- Support for negated Ignores Globs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watcher.