sequenceTubeMap
sequenceTubeMap copied to clipboard
Fail to build
Dear @adamnovak, I came cross an error when I build sequenceTubeMap
(yarn) [poultrylab1@pbsnode01 sequenceTubeMap]$ yarn install
yarn install v1.22.19
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 0.49s.
(yarn) [poultrylab1@pbsnode01 sequenceTubeMap]$ yarn build
yarn run v1.22.19
$ react-scripts build
Creating an optimized production build...
Failed to compile.
[eslint] Failed to load plugin 'import' declared in 'package.json » eslint-config-react-app': Cannot find module 'typescript/package.json'
Require stack:
- /storage-01/poultrylab1/zhaoqiangsen/software/sequenceTubeMap/node_modules/eslint-plugin-import/lib/rules/no-duplicates.js
- /storage-01/poultrylab1/zhaoqiangsen/software/sequenceTubeMap/node_modules/eslint-plugin-import/lib/index.js
- /storage-01/poultrylab1/zhaoqiangsen/software/sequenceTubeMap/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
(yarn) [poultrylab1@pbsnode01 sequenceTubeMap]$ l
total 1.7M
drwxrwxr-x 2 poultrylab1 poultrylab1 53 Jan 12 10:48 build
drwxrwxr-x 925 poultrylab1 poultrylab1 28K Jan 12 10:40 node_modules
-rw-rw-r-- 1 poultrylab1 poultrylab1 474K Jan 12 10:38 yarn.lock
drwxrwxr-x 2 poultrylab1 poultrylab1 32 Jan 12 10:13 uploads
drwxrwxr-x 4 poultrylab1 poultrylab1 295 Jan 12 10:13 src
drwxrwxr-x 2 poultrylab1 poultrylab1 121 Jan 12 10:13 scripts
drwxrwxr-x 2 poultrylab1 poultrylab1 75 Jan 12 10:13 public
-rw-rw-r-- 1 poultrylab1 poultrylab1 2.0K Jan 12 10:13 package.json
-rw-rw-r-- 1 poultrylab1 poultrylab1 1.1M Jan 12 10:13 package-lock.json
drwxrwxr-x 2 poultrylab1 poultrylab1 104 Jan 12 10:13 images
drwxrwxr-x 4 poultrylab1 poultrylab1 4.0K Jan 12 10:13 exampleData
-rw-rw-r-- 1 poultrylab1 poultrylab1 1015 Jan 12 10:13 deploy.md
-rw-rw-r-- 1 poultrylab1 poultrylab1 1.1K Jan 12 10:13 LICENSE.txt
-rw-rw-r-- 1 poultrylab1 poultrylab1 11K Jan 12 10:13 README.md
Could you help me ? Thanks in advance!
Best Johnson
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
[email protected] /storage-01/poultrylab1/zhaoqiangsen/software/sequenceTubeMap
├── @emotion/[email protected]
├── @emotion/[email protected]
├── @fortawesome/[email protected]
├── @fortawesome/[email protected]
├── @fortawesome/[email protected]
├── @material-ui/[email protected]
├── @mui/[email protected]
├── @testing-library/[email protected]
├── @testing-library/[email protected]
├── @testing-library/[email protected]
├── @testing-library/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
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!
[email protected] /home/anovak/workspace/sequenceTubeMap
├─┬ @emotion/[email protected]
│ ├─┬ @babel/[email protected]
│ │ └── [email protected]
│ ├─┬ @emotion/[email protected]
│ │ ├─┬ @babel/[email protected]
│ │ │ └── @babel/[email protected] deduped
│ │ ├─┬ @babel/[email protected]
│ │ │ └── @babel/[email protected]
│ │ ├── @babel/[email protected] deduped
│ │ ├── @emotion/[email protected]
│ │ ├── @emotion/[email protected]
│ │ ├── @emotion/[email protected] deduped
│ │ ├─┬ [email protected]
│ │ │ ├── @babel/[email protected] deduped
│ │ │ ├── [email protected] deduped
│ │ │ └── [email protected] deduped
│ │ ├─┬ [email protected]
│ │ │ └── [email protected] deduped
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
...
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:
- Check your
node --version. If it is weirdly old maybe upgrade it? - Try
npm ci(to use thepackage-lock.jsonversions of everything) andnpm run buildfrom a clean checkout, instead of usingyarn. - Try
npm install typescriptand 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.
- My node version
(yarn) [poultrylab1@pbsnode01 sequenceTubeMap]$ npm --version
8.19.2
- 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 [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated [email protected]: 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 [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: 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 [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated [email protected]: 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
> [email protected] 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:
https://cra.link/deployment
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