Comments (4)
This github issue seems to suggest it's caused by the version of Node I am running. I've upgraded from Node 8 to 10 to 12 and now I am getting:
err: RequestError: connect ECONNREFUSED 127.0.0.1:443
at ClientRequest.<anonymous> (~/project_root/node_modules/notion-client/node_modules/got/dist/source/core/index.js:956:111)
at Object.onceWrapper (events.js:421:26)
at ClientRequest.emit (events.js:326:22)
at ClientRequest.EventEmitter.emit (domain.js:483:12)
at ClientRequest.origin.emit (~/project_root/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20)
at TLSSocket.socketErrorListener (_http_client.js:427:9)
at TLSSocket.emit (events.js:314:20)
at TLSSocket.EventEmitter.emit (domain.js:483:12)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
from react-notion-x.
Hey @ademidun, thanks for reaching out.
What version of Node.js are you running exactly?
from react-notion-x.
- Running
node: v10.16.3 (npm v6.9.0)
gave meCannot read property 'startsWith' of undefined
. - Running both
v12.22.1
and10.22.0
gave meECONNREFUSED 127.0.0.1:443
. - When I used
node v8.10.0 (npm v5.6.0)
I got a completely different error (see traceback below):SyntaxError: Unexpected token *'
Note: I used nvm (Node Version Manager) to switch between different Node versions
'~/project_root/node_modules/notion-client/node_modules/got/dist/source/create.js:157',
'const paginateEach = (async function* (url, options) {',
'^',
'',
'SyntaxError: Unexpected token *',
'at createScript (vm.js:80:10)',
'at Object.runInThisContext (vm.js:139:10)',
'at Module._compile (module.js:616:28)',
'at Object.Module._extensions..js (module.js:663:10)',
'at Module.load (module.js:565:32)',
'at tryModuleLoad (module.js:505:12)',
'at Function.Module._load (module.js:497:3)',
'at Module.require (module.js:596:17)',
'at require (internal/module.js:11:18)',
'at Object.<anonymous> ~/project_root/node_modules/notion-client/node_modules/got/dist/source/index.js:14:18)',
'at Module._compile (module.js:652:30)',
'at Object.Module._extensions..js (module.js:663:10)',
'at Module.load (module.js:565:32)',
'at tryModuleLoad (module.js:505:12)',
'at Function.Module._load (module.js:497:3)',
'at Module.require (module.js:596:17)',
'at require (internal/module.js:11:18)',
'at Object.<anonymous> ~/project_root/node_modules/notion-client/src/notion-api.ts:1:1)',
'at Module._compile (module.js:652:30)',
'at Object.Module._extensions..js (module.js:663:10)',
'at Module.load (module.js:565:32)',
'at tryModuleLoad (module.js:505:12)',
'at Function.Module._load (module.js:497:3)',
'at Module.require (module.js:596:17)',
'at require (internal/module.js:11:18)',
'at Object.<anonymous> ~/project_root/node_modules/notion-client/src/index.ts:1:1)',
'at Module._compile (module.js:652:30)',
'at Object.Module._extensions..js (module.js:663:10)',
'at Module.load (module.js:565:32)',
'at tryModuleLoad (module.js:505:12)',
'at Function.Module._load (module.js:497:3)',
'at Module.require (module.js:596:17)',
'at require (internal/module.js:11:18)',
'at Object.notion-client ~/project_root/.webpack/service/webpack:/external "notion-client":1:1)',
'at __webpack_require__ ~/project_root/.webpack/service/webpack:/webpack/bootstrap:19:1)',
'at Object../notion/notionPages.js ~/project_root/.webpack/service/webpack:/notion/notionPages.js:1:1)',
'at __webpack_require__ ~/project_root/.webpack/service/webpack:/webpack/bootstrap:19:1)',
'at Object../server.js ~/project_root/.webpack/service/webpack:/server.js:13:1)',
'at __webpack_require__ ~/project_root/.webpack/service/webpack:/webpack/bootstrap:19:1)',
'at ./constants.js.Object.defineProperty.value ~/project_root/.webpack/service/webpack:/webpack/bootstrap:83:1)',
'at Object.<anonymous> ~/project_root/.webpack/service/server.js:87:10)',
'at Module._compile (module.js:652:30)',
'at Object.Module._extensions..js (module.js:663:10)',
'at Module.load (module.js:565:32)',
'at tryModuleLoad (module.js:505:12)',
'at Function.Module._load (module.js:497:3)',
'at Module.require (module.js:596:17)',
'at require (internal/module.js:11:18)',
'at Object.createHandler ~/project_root/node_modules/serverless-offline/src/functionHelper.js:194:17)',
'at handler ~/project_root/node_modules/serverless-offline/src/index.js:664:44)',
'at module.exports.internals.Manager.execute ~/project_root/node_modules/@hapi/hapi/lib/toolkit.js:41:33)',
'at Object.internals.handler ~/project_root/node_modules/@hapi/hapi/lib/handler.js:46:48)',
'at exports.execute ~/project_root/node_modules/@hapi/hapi/lib/handler.js:31:36)',
'at Request._lifecycle ~/project_root/node_modules/@hapi/hapi/lib/request.js:312:68)',
from react-notion-x.
We only officially support node >= 12. Note that node v8 is no longer supported by node.js.
The startsWith
error with node v10 is expected since we don't support node v10.
The only error here we can really help with is the node v12 one.
ECONNREFUSED 127.0.0.1:443
seems like an issue where your code is trying to access localhost; I would guess this has to do with the serverless-offline
.
My advice would be to get your example with node >= 12 working outside of serverless-offline
first by running node.js directly. Once that's working, then reintroduce serverless-offline and figure out what's going on there.
Best of luck.
from react-notion-x.
Related Issues (20)
- Collection View Page block is not rendering page contents HOT 1
- Attempt to rewrite and execute renamed hash links - need advice
- How do I display private notion images? HOT 1
- Some errors about dns?
- .
- notion-client not supported with bun HOT 1
- Reintroduce CommonJS to make it easier to use the library HOT 2
- Private Page: d.map is not a function
- Issues in using react-notion-x in NextJS (app structure).
- Deploy the latest version on npm
- Broken link in NotionRenderer breadcrumb
- Failed to fetch appears. Please help.
- Failed to resolve 'p-queue' from 'notion-utils' HOT 1
- Is the repo still maintained? HOT 6
- x
- Match Ordered List number to Notion
- Next.js App Router Customer Image Component
- Mirror Notion in hiding block_width "0" assets
- `katex` Requires Update
- Adding the option to show latex code when clicking equation blocks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-notion-x.