makenotion / notion-sdk-js

Official Notion JavaScript Client

Home Page:https://developers.notion.com/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm install ERR! for 'parse-text-from-any-block-type' examples

XHXIAIEIN opened this issue · comments

Problem description

I am reading 'parse-text-from-any-block-type' examples.

I followed the steps in the guide

# Clone this repository locally
git clone https://github.com/makenotion/notion-sdk-js.git

# Switch into this project
cd notion-sdk-js/examples/parse-text-from-any-block-type

# Install the dependencies
npm install

but threw an error.

PS D:\Project\Github\notion-sdk-js\examples\parse-text-from-any-block-type> npm install
npm ERR! code 1
npm ERR! path D:\Project\Github\notion-sdk-js
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c npm run build
npm ERR! > @notionhq/client@2.2.14 prebuild
npm ERR! > npm run clean
npm ERR! 
npm ERR! 
npm ERR! > @notionhq/client@2.2.14 clean
npm ERR! > rm -rf ./build
npm ERR! 'rm' �����ڲ����ⲿ���Ҳ���ǿ����еij���
npm ERR! ���������ļ���

npm ERR! A complete log of this run can be found in: C:\Users\XHXIAIEIN\AppData\Local\npm-cache\_logs\2024-01-24T17_29_08_911Z-debug-0.log
PS D:\Project\Github\notion-sdk-js\examples\parse-text-from-any-block-type> 

Snipaste_2024-01-25_01-33-30

Solution

I found that this issue is caused by this part in the package.json file.

Snipaste_2024-01-25_01-39-23

After I edit it, it can work now

  "dependencies": {
    "@notionhq/client": "^2.2.7",
    "dotenv": "^16.3.1",
    "express": "^4.18.2"
  },

Snipaste_2024-01-25_01-38-28

To Reproduce
Node version: node 20.11.0
Notion JS library version: