Comments (15)
Having the same issue but regardless usage of pika in my project works fine:
"prepare": "pika-web --clean"
from snowpack.
Well, in my case it never completes, and never creates the web_modules
dir, so it can't work fine. :-(
from snowpack.
@garyo Hey, thanks for filing. @pika/web seems to have trouble with two packages, which I actually had to blacklist from the CDN:
- @angular/core
- rx-compat
rx-compat just really freaks it out, I think because it circularly loads a reference to rx as common.js instead of it's normal ESM? I don't know, but until we solve the issue we should at least add a "rxjs-compat is not supported" warning message so that you have an idea of why it's hanging.
from snowpack.
I am having this same issue. Something I noticed is that rxjs
is a dependency of inquirer
, which in turn is a dependency of eslint
.
β @pika/web installing... { Error: Cannot find module 'rxjs-compat'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
at Function.Module._load (internal/modules/cjs/loader.js:591:27)
at Module.require (internal/modules/cjs/loader.js:723:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object.<anonymous> (/home/zeb/Coding/freeCodeCamp/zeb-fcc-basic-mathematical-calculation-device/node_modules/rxjs/Rx.js:6:10)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Module.require (internal/modules/cjs/loader.js:723:19) code: 'MODULE_NOT_FOUND' }
Error: You must supply options.input to rollup
at Promise.all.then (/home/zeb/.npm/_npx/8494/lib/node_modules/@pika/web/node_modules/rollup/dist/rollup.js:16695:23)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:56:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:880:11)
at findNodeScript.then.existing (/usr/lib/node_modules/npm/node_modules/libnpx/index.js:268:14)
β @pika/web installing... classnames, react, react-dom
(It gets stuck here indefinitely.)
from snowpack.
I think what @FredKSchott was saying above is we need to wait for a fix from him. There's no workaround currently.
from snowpack.
Yea sorry, this is a bug in rollup that I don't currently have the bandwidth to help fix. We can look into adding some better error messaging, and hopefully rxjs-compat is phased out over time (I believe it was only meant for rxjs v5 -> v6 migration).
from snowpack.
I'm also facing the same issue on my package (see here). It's really weird I'm using rxjs v6 and the proper imports since a while, I don't know why it still wants to install 'rxjs-compat' which is only needed to convert v5 imports.
@seriva Adding the prepare script you mentioned make my npm pack
command fail : no pika-web
command, is there something to install ?
Anyway I added rxjs-compat
as dependency and it works now. Hope rxjs@7 is published soon and this package is definitely dropped !
-- EDIT --
I don't understand what's going on, I can use my package's pika CDN fine in a jsbin, however when I get back at the pika dev page for my package, the CDN view says :
ERROR : 'rxjs-compat not currently supported'.
What the hell it worked the first time saying 'N/A' and it is still working in my jsbin, why does it says error now ? Please @FredKSchott enlighten me :)
from snowpack.
From the pika link, it looks like you're list rxjs-compat as a dependency of your package. Maybe some tool is adding that for you behind the scenes?
from snowpack.
Yes I do have the rxjs-compat dependency explicitly ! If I don't add it, I bump into the same issue stated here with "@pika/web installing... { Error: Cannot find module 'rxjs-compat'...".
I am sincerely confused because it worked with rxjs-compat package at first before saying ERROR on the CDN. The REPL function still works though.
from snowpack.
So I took another look at this, and I'm about to CDN build your package once the "rxjs-compat" dependency is removed. Could you try removing it and tryingΒ publishing again? FWIW I don't think it's being used by your package, so removing it shouldn't affect any users.
from snowpack.
Sure I'll do that right now and edit my post ;)
--- edit ---
Done !
from snowpack.
Alright, I think we're getting closer. The error now is: https://www.pika.dev/packages/@ogod/core/cdn
SyntaxError: Unexpected token (60:11) in /tmp/cdn/_WMx4FSxkiTpWNNQYBDnZ/node_modules/@ogod/core/dist/core/redux/epic.js
I think it's because of this: https://github.com/Elvynia/ogod-core/blob/master/src/core/redux/epic.ts#L232-L238 (window.process doesn't exist in node v8 (and above?) or the browser). Get rid of the "window" part of it and it should work.
if (process.env.NODE_ENV !== 'production') {
epics.push(debugActionsEpic);
if (process.env.NODE_ENV === 'development') {
epics.push(debugChangesEpic);
epics.push(debugUpdatesEpic);
}
}
from snowpack.
I just published a new version, it's still in error I don't know if it's the same exactly. I don't understand those lines :
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
Do you ?
--- edit ---
It seems that it's just a warning, I should take care of the circular dependency and conflicting namespaces. I should try to run pika in local instead of republishing right ?
from snowpack.
Yea what I'll do to test locally is run @pika/web
and use the path to your local distribution instead of the package name. Something like:
// package.json
"@pika/web": {
"webDependencies": ["~/path/to/local/package"]
}
// Then run:
npx @pika/web
from snowpack.
π This issue has been moved! Continue the discussion on our new package message board:
https://www.pika.dev/packages/@pika/web/discuss/1088
from snowpack.
Related Issues (20)
- π BUG: Can't quit dev server Win11 HOT 2
- π‘ RFC: Option to skip esbuild transform
- π BUG: hmr-client.js fails to load when inside of a srcdoc iframe
- Install snowpack for development failed. HOT 2
- π‘ RFC: Allow acess to hmr engine websocket service
- π BUG: [esinstall] duplicate export 'default' react
- π BUG: dev server fails with "Uncaught TypeError: require$$0 is not a function" due to incorrect require() transform
- π BUG: esinstall: πPutout support
- AMD requirejs module support (or docs on how to ..)
- π BUG: Skypack build fails if using modern JS features
- π BUG: `index.bin.js` file is mistaken as Trojan by Kaspersky and got deleted HOT 2
- π‘ RFC: Setting to hide deprecated options in the docs
- π BUG: default export problem
- π BUG: problem with default export / import in some cases HOT 1
- π BUG:
- π BUG: Snowpack can't find /src/index.jsx no matter what I do? HOT 1
- π BUG: Can't transpile files with new ES features such as optional chaining and private class fields
- π BUG: vm2 has been discontinued and has a critical vulnerability identified
- I can't install a template. HOT 1
- π BUG: Build Result Error: There was a problem with a file build result. [object Object]
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 snowpack.