vstan02 / readium

An online book sharing social networking service
GNU General Public License v3.0
2 stars 1 forks source link

Cant build #3

Open Emilien-Etadam opened 3 years ago

Emilien-Etadam commented 3 years ago

Error on "npm run build"

> build
> npm run build --prefix core

> core-readmium@0.0.0 build
> tsc -p .

src/api/auth/authMiddleware.ts:18:29 - error TS2307: Cannot find module 'express-validator' or its corresponding type declarations.

18 import { checkSchema } from 'express-validator';
                               ~~~~~~~~~~~~~~~~~~~
src/api/core/RequestValidator.ts:19:34 - error TS2307: Cannot find module 'express-validator' or its corresponding type declarations.

19 import { validationResult } from 'express-validator';
                                    ~~~~~~~~~~~~~~~~~~~
Found 2 errors.

npm ERR! code 2
npm ERR! path /root/readium/core
npm ERR! command failed
npm ERR! command sh -c tsc -p .

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-08-25T09_43_22_998Z-debug.log
npm ERR! code 2
npm ERR! path /root/readium
npm ERR! command failed
npm ERR! command sh -c npm run build --prefix core

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-08-25T09_43_23_025Z-debug.log

Here the logs :

GNU nano 5.4 /root/.npm/_logs/2021-08-25T09_40_14_657Z-debug.log
0 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ] 1 info using npm@7.5.2 2 info using node@v12.22.5 3 timing config:load:defaults Completed in 2ms 4 timing config:load:file:/usr/share/nodejs/npm/npmrc Completed in 2ms 5 timing config:load:builtin Completed in 2ms 6 timing config:load:cli Completed in 2ms 7 timing config:load:env Completed in 1ms 8 timing config:load:file:/root/readium/.npmrc Completed in 0ms 9 timing config:load:project Completed in 1ms 10 timing config:load:file:/root/.npmrc Completed in 0ms 11 timing config:load:user Completed in 0ms 12 timing config:load:file:/etc/npmrc Completed in 1ms 13 timing config:load:global Completed in 1ms 14 timing config:load:cafile Completed in 0ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:setUserAgent Completed in 1ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 12ms 19 verbose npm-session a9548b40ac95257a 20 timing npm:load Completed in 25ms 21 timing command:run-script Completed in 8032ms 22 verbose stack Error: command failed 22 verbose stack at ChildProcess. (/usr/share/nodejs/@npmcli/promise-spawn/index.js:64:27) 22 verbose stack at ChildProcess.emit (events.js:314:20) 22 verbose stack at maybeClose (internal/child_process.js:1022:16) 22 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) 23 verbose cwd /root/readium 24 verbose Linux 5.4.72-microsoft-standard-WSL2 25 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build" 26 verbose node v12.22.5 27 verbose npm v7.5.2 28 error code 2 29 error path /root/readium 30 error command failed 31 error command sh -c npm run build --prefix core 32 verbose exit 2

What am I doing wrong ?

Emilien-Etadam commented 3 years ago

I installed express-validator npm install express-validator Seems fine now

Emilien-Etadam commented 3 years ago

New problem with "npm run dev"


> dev
> npm run dev --prefix core

> core-readmium@0.0.0 dev
> npm run lint && ts-node src/index.ts

> core-readmium@0.0.0 lint
> eslint 'src/**' --fix --ext .js,.ts

Oops! Something went wrong! :(

ESLint: 6.8.0.

No files matching the pattern "'src/**'" were found.
Please check for typing mistakes in the pattern.
vstan02 commented 2 years ago

I'm sorry I didn't answer earlier. I think the problem was solved in the last commit and it should be fine now. If there are still problems with building or running the project please report them here.