Open Johnsonzcode opened 1 year ago
I just tried checking out the current commit and ran:
npm install
npm run build
using NPM 6.14.15 and Node v14.18.2, and the build worked.
If I do npm ls
I do see a bunch of complaints about unmet peer dependencies on typescript
, but those are peer dependencies of things a couple levels down in the dependency tree, and not peer dependencies of any modules we actually directly depend on, so they shouldn't need to be met by us, as far as I can tell. We don't actually have any Typescript code that gets imported, just a little pseudo-typescript for documentation.
After that I tried:
yarn install
yarn build
and that also worked, with Yarn 1.22.0.
Then I tried building from a clean checkout:
git clone https://github.com/vgteam/sequenceTubeMap.git
cd sequenceTubeMap
yarn install
yarn build
And that also worked.
So then I installed Yarn 1.22.19 exactly, and built from a clean checkout again. That also worked.
Then I wondered if you were using a different Node, so I installed Node 18 (since Node 17 is not compatible with Yarn 1.22.19) and Yarn 1.22.19 and did it again. That also worked, and even managed to produce some eslint warnings.
What does your npm ls
say @Johnsonzcode? Did you maybe also install typescript
or otherwise do something that I'm not doing?
I did't do anything else, just install yarn
from mamba.
This is npm ls
information
(yarn) [poultrylab1@pbsnode01 sequenceTubeMap]$ npm ls
sequence-tube-maps@0.1.0 /storage-01/poultrylab1/zhaoqiangsen/software/sequenceTubeMap
├── @emotion/react@11.10.5
├── @emotion/styled@11.10.5
├── @fortawesome/fontawesome-svg-core@6.2.1
├── @fortawesome/free-solid-svg-icons@6.2.1
├── @fortawesome/react-fontawesome@0.2.0
├── @material-ui/core@4.12.4
├── @mui/material@5.11.4
├── @testing-library/dom@8.19.1
├── @testing-library/jest-dom@5.16.5
├── @testing-library/react@12.1.5
├── @testing-library/user-event@13.5.0
├── body-parser@1.20.1
├── bootstrap@5.2.2
├── compression@1.7.4
├── concurrently@7.6.0
├── d3-selection-multi@1.0.1
├── d3@5.16.0
├── dotenv@16.0.3
├── express@4.18.2
├── fs-extra@10.1.0
├── gh-pages@4.0.0
├── multer@1.4.4
├── path-is-inside@1.0.2
├── polyfill-object.fromentries@1.0.1
├── prettier@2.8.2
├── prop-types@15.8.1
├── qs@6.11.0
├── react-dom@17.0.2
├── react-fast-compare@3.2.0
├── react-scripts@5.0.1
├── react-select-event@5.5.1
├── react-select@5.7.0
├── react@17.0.2
├── reactstrap@9.1.5
├── uuid@9.0.0
├── webpack-dev-server@4.11.1
├── webpack@5.75.0
└── websocket@1.0.34
Hmmm. That's nowhere near enough modules, and none of them have any of their dependencies installed. I don't think yarn
installed the project's dependencies properly. My npm ls
looks like this and goes on for a few pages:
[anovak@octagon sequenceTubeMap]$ npm ls
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
sequence-tube-maps@0.1.0 /home/anovak/workspace/sequenceTubeMap
├─┬ @emotion/react@11.10.5
│ ├─┬ @babel/runtime@7.20.1
│ │ └── regenerator-runtime@0.13.10
│ ├─┬ @emotion/babel-plugin@11.10.5
│ │ ├─┬ @babel/helper-module-imports@7.18.6
│ │ │ └── @babel/types@7.20.2 deduped
│ │ ├─┬ @babel/plugin-syntax-jsx@7.18.6
│ │ │ └── @babel/helper-plugin-utils@7.20.2
│ │ ├── @babel/runtime@7.20.1 deduped
│ │ ├── @emotion/hash@0.9.0
│ │ ├── @emotion/memoize@0.8.0
│ │ ├── @emotion/serialize@1.1.1 deduped
│ │ ├─┬ babel-plugin-macros@3.1.0
│ │ │ ├── @babel/runtime@7.20.1 deduped
│ │ │ ├── cosmiconfig@7.0.1 deduped
│ │ │ └── resolve@1.22.0 deduped
│ │ ├─┬ convert-source-map@1.8.0
│ │ │ └── safe-buffer@5.1.2 deduped
│ │ ├── escape-string-regexp@4.0.0
│ │ ├── find-root@1.1.0
│ │ ├── source-map@0.5.7
│ │ └── stylis@4.1.3
...
What npm --version
do you have? Maybe you have a new one that elides nested dependencies from the list somehow?
I'm not sure how mamba
works; I get my yarn
through npm
and my npm
and node
through NVM. Is there like a set of commands I can run in a Docker container to set up mamba
the way you have it set up so I can try and replicate your problem?
To try and get it working, I would recommend:
node --version
. If it is weirdly old maybe upgrade it?npm ci
(to use the package-lock.json
versions of everything) and npm run build
from a clean checkout, instead of using yarn
.npm install typescript
and try the build again, because it's complaining about a missing typescript and you can just give it one like that.1.mamba
is like conda
, as a kind of packages management tools.
I just create an environment named yarn, and install yarn
by mamba install yarn=1.22.19 -c anaconda/cloud/conda-forge
. Then I follow documentation
git clone https://github.com/vgteam/sequenceTubeMap.git
cd sequenceTubeMap
yarn install
yarn build
After this I came across the error.
(yarn) [poultrylab1@pbsnode01 sequenceTubeMap]$ npm --version
8.19.2
3. Try npm ci (to use the package-lock.json versions of everything) and npm run build from a clean checkout, instead of using yarn.
(yarn) [poultrylab1@pbsnode01 sequenceTubeMap]$ npm ci npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin. npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated multer@1.4.4: Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10. npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm WARN deprecated core-js@3.21.1: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
added 1417 packages, and audited 1418 packages in 47s
188 packages are looking for funding
run npm fund
for details
21 vulnerabilities (20 high, 1 critical)
To address issues that do not require attention, run: npm audit fix
To address all issues possible (including breaking changes), run: npm audit fix --force
Some issues need review, and may require choosing a different dependency.
Run npm audit
for details.
(yarn) [poultrylab1@pbsnode01 sequenceTubeMap]$ npm run build
sequence-tube-maps@0.1.0 build react-scripts build
Creating an optimized production build... Compiled with warnings.
src/components/HeaderForm.js Line 345:13: The array literal notation [] is preferable no-array-constructor
Search for the keywords to learn more about each warning. To ignore, add // eslint-disable-next-line to the line before.
File sizes after gzip:
227.05 kB build/static/js/main.4377647b.js 28.62 kB build/static/css/main.b072c09f.css 2.57 kB build/static/js/599.32ebe36f.chunk.js
The project was built assuming it is hosted at /. You can control this with the homepage field in your package.json.
The build folder is ready to be deployed. You may serve it with a static server:
yarn global add serve serve -s build
Find out more about deployment here:
It seems it works.
Because
(yarn) [poultrylab1@pbsnode01 sequenceTubeMap]$ yarn serve yarn run v1.22.19 $ node ./src/server.js TubeMapServer listening on http://[::]:3000
Dear @adamnovak, I came cross an error when I build sequenceTubeMap
Could you help me ? Thanks in advance!
Best Johnson