I am following https://docs.moralis.io/docs/run-parse-server-locally
While
npm i
I am getting
[email protected] build
tsc
src/auth/MoralisEthAdapter.ts:3:21 - error TS2307: Cannot find module ‘moralis’ or its corresponding type declarations.
3 import Moralis from ‘moralis’;
~~~~~~~~~
src/auth/MoralisEthAdapter.ts:14:12 - error TS7006: Parameter ‘result’ implicitly has an ‘any’ type.
14 .then((result) => {
~~~~~~
src/auth/authService.ts:1:21 - error TS2307: Cannot find module ‘moralis’ or its corresponding type declarations.
1 import Moralis from ‘moralis’;
~~~~~~~~~
src/cloud/generated/evmApi.ts:3:21 - error TS2307: Cannot find module ‘moralis’ or its corresponding type declarations.
3 import Moralis from ‘moralis’
~~~~~~~~~
src/cloud/generated/evmApi.ts:4:30 - error TS2307: Cannot find module ‘@moralisweb3/common-core’ or its corresponding type declarations.
4 import { MoralisError } from ‘@moralisweb3/common-core’;
~~~~~~~~~~~~~~~~~~~~~~~~~~
src/cloud/generated/evmApi.ts:13:11 - error TS2550: Property ‘cause’ does not exist on type ‘Error’. Do you need to change your target library? Try changing the ‘lib’ compiler option to ‘es2022’ or later.
13 error.cause &&
~~~~~
src/cloud/generated/evmApi.ts:14:11 - error TS2550: Property ‘cause’ does not exist on type ‘Error’. Do you need to change your target library? Try changing the ‘lib’ compiler option to ‘es2022’ or later.
14 error.cause instanceof AxiosError &&
~~~~~
src/cloud/generated/evmApi.ts:15:11 - error TS2550: Property ‘cause’ does not exist on type ‘Error’. Do you need to change your target library? Try changing the ‘lib’ compiler option to ‘es2022’ or later.
15 error.cause.response &&
~~~~~
src/cloud/generated/evmApi.ts:16:11 - error TS2550: Property ‘cause’ does not exist on type ‘Error’. Do you need to change your target library? Try changing the ‘lib’ compiler option to ‘es2022’ or later.
16 error.cause.response.data
~~~~~
src/cloud/generated/evmApi.ts:18:33 - error TS2550: Property ‘cause’ does not exist on type ‘Error’. Do you need to change your target library? Try changing the ‘lib’ compiler option to ‘es2022’ or later.
18 return JSON.stringify(error.cause.response.data);
~~~~~
src/cloud/generated/solApi.ts:3:21 - error TS2307: Cannot find module ‘moralis’ or its corresponding type declarations.
3 import Moralis from ‘moralis’
~~~~~~~~~
src/cloud/generated/solApi.ts:4:30 - error TS2307: Cannot find module ‘@moralisweb3/common-core’ or its corresponding type declarations.
4 import { MoralisError } from ‘@moralisweb3/common-core’;
~~~~~~~~~~~~~~~~~~~~~~~~~~
src/cloud/generated/solApi.ts:13:11 - error TS2550: Property ‘cause’ does not exist on type ‘Error’. Do you need to change your target library? Try changing the ‘lib’ compiler option to ‘es2022’ or later.
13 error.cause &&
~~~~~
src/cloud/generated/solApi.ts:14:11 - error TS2550: Property ‘cause’ does not exist on type ‘Error’. Do you need to change your target library? Try changing the ‘lib’ compiler option to ‘es2022’ or later.
14 error.cause instanceof AxiosError &&
~~~~~
src/cloud/generated/solApi.ts:15:11 - error TS2550: Property ‘cause’ does not exist on type ‘Error’. Do you need to change your target library? Try changing the ‘lib’ compiler option to ‘es2022’ or later.
15 error.cause.response &&
~~~~~
src/cloud/generated/solApi.ts:16:11 - error TS2550: Property ‘cause’ does not exist on type ‘Error’. Do you need to change your target library? Try changing the ‘lib’ compiler option to ‘es2022’ or later.
16 error.cause.response.data
~~~~~
src/cloud/generated/solApi.ts:18:33 - error TS2550: Property ‘cause’ does not exist on type ‘Error’. Do you need to change your target library? Try changing the ‘lib’ compiler option to ‘es2022’ or later.
18 return JSON.stringify(error.cause.response.data);
~~~~~
src/index.ts:1:21 - error TS2307: Cannot find module ‘moralis’ or its corresponding type declarations.
1 import Moralis from ‘moralis’;
~~~~~~~~~
src/index.ts:10:29 - error TS2307: Cannot find module ‘@moralisweb3/parse-server’ or its corresponding type declarations.
10 import { streamsSync } from ‘@moralisweb3/parse-server’;
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 19 errors in 5 files.
Errors Files
2 src/auth/MoralisEthAdapter.ts:3
1 src/auth/authService.ts:1
7 src/cloud/generated/evmApi.ts:3
7 src/cloud/generated/solApi.ts:3
2 src/index.ts:1
npm ERR! Lifecycle script build
failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: [email protected]
npm ERR! at location: /home/rohitmittal/Downloads/Moralis-JS-SDK-main/demos/parse-server-migration
I am using Node version recommended as well.
Is there something i am missing?