neuhausi / canvasxpress-react

React package to run CanvasXpress
https://www.canvasxpress.org
2 stars 4 forks source link

canvasxpress isn't listed as a dependency #2

Closed sammyjava closed 1 year ago

sammyjava commented 1 year ago

npm i canvasxpress-react doesn't install canvasxpress as a dependency.

neuhausi commented 1 year ago

npm install canvasxpress-react --save

sammyjava commented 1 year ago
$ npm install canvasxpress-react --save

added 1 package, and audited 1449 packages in 2s

Note 1 package, not two.

$ grep canvasxpress package-lock.json 
        "canvasxpress-react": "^40.4.114",
    "node_modules/canvasxpress-react": {
      "resolved": "https://registry.npmjs.org/canvasxpress-react/-/canvasxpress-react-40.4.114.tgz",
    "canvasxpress-react": {
      "resolved": "https://registry.npmjs.org/canvasxpress-react/-/canvasxpress-react-40.4.114.tgz",
$
$ grep canvasxpress package.json 
    "canvasxpress-react": "^40.4.114",
$
$ npm install canvasxpress --save

added 1 package, and audited 1450 packages in 3s

Now it's been added.

neuhausi commented 1 year ago

Oh. Do you mean I should add CanvasXpress in the json.package?

sammyjava commented 1 year ago

Yeah, as a dependency. It's called from canvasxpress-react. Not a big deal, but thought I'd mention it. node modules are supposed to include all of their dependencies.

neuhausi commented 1 year ago

I thought that was part of the browser

Get Outlook for iOShttps://aka.ms/o0ukef


From: Sam Hokin @.> Sent: Wednesday, October 12, 2022 2:36:43 PM To: neuhausi/canvasxpress-react @.> Cc: neuhausi @.>; Comment @.> Subject: Re: [neuhausi/canvasxpress-react] canvasxpress isn't listed as a dependency (Issue #2)

Oh, crypto as well, in the canvasxpress module. :)

Module not found: Error: Can't resolve 'crypto' in '/home/shokin/react-canvasxpress/node_modules/canvasxpress/src'

— Reply to this email directly, view it on GitHubhttps://github.com/neuhausi/canvasxpress-react/issues/2#issuecomment-1276579789, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAB6HS57XO5XNBFQEEZ4MBLWC4ALXANCNFSM6AAAAAARDPQ4NY. You are receiving this because you commented.Message ID: @.***>

sammyjava commented 1 year ago

Yeah that was my mistake, I deleted the comment.

neuhausi commented 1 year ago

Are you set until the next release?

sammyjava commented 1 year ago

I got stuff to work in the create-react-app environment, but right now in the InterMine bluegenes setup I'm struggling with the following which is thrown from a css in canvasexpress module:

Uncaught Error: Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> @charset "UTF-8";

I presume I have to tweak webpack in some way, but so far I'm striking out. I expect I'll figure it out. I don't want to edit your module and I know it works in the create-react-app enviro.

sammyjava commented 1 year ago

This is the top line for the above trace. Some webpack loader issue. webpack://canvasXpressTest/./node_modules/canvasxpress/src/canvasXpress.css?:1

neuhausi commented 1 year ago

Let me know if you want me to make a change.

sammyjava commented 1 year ago

I figured out the webpack problem. I needed to install an old version of css-loader 5.2.7 to work with the older webpack this setup uses, and had to add this to the rules in webpack.config.js:

            {
                test: /\.s?[ac]ss$/,
                use: {
                    loader: "css-loader"
                }
            }
neuhausi commented 1 year ago

Perfect. Thank you

Get Outlook for iOShttps://aka.ms/o0ukef


From: Sam Hokin @.> Sent: Thursday, October 13, 2022 12:52:37 PM To: neuhausi/canvasxpress-react @.> Cc: neuhausi @.>; Comment @.> Subject: Re: [neuhausi/canvasxpress-react] canvasxpress isn't listed as a dependency (Issue #2)

I figured out the webpack problem. I needed to install an old version of css-loader 5.2.7 to work with the older webpack this setup uses, and had to add this to the rules in webpack.config.js:

        {
            test: /\.s?[ac]ss$/,
            use: {
                loader: "css-loader"
            }
        }

— Reply to this email directly, view it on GitHubhttps://github.com/neuhausi/canvasxpress-react/issues/2#issuecomment-1277908479, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAB6HS4L3DYUDRGLTXCNT53WDA45LANCNFSM6AAAAAARDPQ4NY. You are receiving this because you commented.Message ID: @.***>