Cannot initialise builder IO build devtools at all

Hello
I’ve just signed up to Builder IO to trial it for a potential future project, and have followed the instructions to add Builder IO builder devtools to my project. It’s a simple Vite/React project with a few components for now.

When I run npm init builder.io@latest I’m presented with an error:

npm init builder.io

node:internal/modules/cjs/loader:1051
  throw err;
  ^

Error: Cannot find module '@sentry/node'
Require stack:
- /Users/me.r/.npm/_npx/a412aa29d8155116/node_modules/create-builder.io/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/Users/me.r/.npm/_npx/a412aa29d8155116/node_modules/create-builder.io/index.js:1020:1689)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/me.r/.npm/_npx/a412aa29d8155116/node_modules/create-builder.io/index.js'
  ]
}

Node.js v20.9.0
npm ERR! code 1
npm ERR! path /Users/me.r/Documents/mywork/buildio/my-first-builder-io-app
npm ERR! command failed
npm ERR! command sh -c create-builder

npm ERR! A complete log of this run can be found in:

I wonder if the missing sentry package is a red herring and the error is elsewhere deeper in the Builder IO package perhaps?

I’ve tried with older versions of Node (18 and 16) and tried installing in a brand new directory away from my project. But I still receive this same error. I also followed this stackoverflow post which recommends installing the builder-io package first, but no luck with that either.

Below is the more detailed log of the problem.

0 verbose cli /Users/me.r/.nvm/versions/node/v20.9.0/bin/node /Users/me.r/.nvm/versions/node/v20.9.0/bin/npm
1 info using npm@10.1.0
2 info using node@v20.9.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/Users/me.r/.nvm/versions/node/v20.9.0/lib/node_modules/npm/npmrc Completed in 0ms
6 timing config:load:builtin Completed in 0ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/Users/me.r/Documents/mywork/buildio/my-first-builder-io-app/.npmrc Completed in 0ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:/Users/me.r/.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/Users/me.r/.nvm/versions/node/v20.9.0/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 6ms
17 timing npm:load:configload Completed in 6ms
18 timing config:load:flatten Completed in 1ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm init builder.io
22 verbose argv "init" "builder.io"
23 timing npm:load:setTitle Completed in 5ms
24 timing npm:load:display Completed in 0ms
25 verbose logfile logs-max:10 dir:/Users/me.r/.npm/_logs/2025-02-23T13_23_06_168Z-
26 verbose logfile /Users/me.r/.npm/_logs/2025-02-23T13_23_06_168Z-debug-0.log
27 timing npm:load:logFile Completed in 4ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 23ms
31 silly logfile start cleaning logs, removing 2 files
32 timing arborist:ctor Completed in 1ms
33 silly logfile done cleaning log files
34 timing arborist:ctor Completed in 0ms
35 http fetch GET 200 https://registry.npmjs.org/create-builder.io 145ms (cache updated)
36 timing arborist:ctor Completed in 0ms
37 timing arborist:ctor Completed in 0ms
38 timing command:init Completed in 408ms
39 verbose stack Error: command failed
39 verbose stack     at ChildProcess.<anonymous> (/Users/me.r/.nvm/versions/node/v20.9.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
39 verbose stack     at ChildProcess.emit (node:events:514:28)
39 verbose stack     at maybeClose (node:internal/child_process:1105:16)
39 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
40 verbose pkgid my-first-builder-io-app@0.0.0
41 verbose cwd /Users/me.r/Documents/mywork/buildio/my-first-builder-io-app
42 verbose Darwin 23.5.0
43 verbose node v20.9.0
44 verbose npm  v10.1.0
45 error code 1
46 error path /Users/me.r/Documents/mywork/buildio/my-first-builder-io-app
47 error command failed
48 error command sh -c create-builder
49 verbose exit 1
50 timing npm Completed in 551ms
51 verbose code 1
52 error A complete log of this run can be found in: /Users/me.r/.npm/_logs/2025-02-23T13_23_06_168Z-debug-0.log

Any help would be greatly appreciated. Many thanks in advance :slight_smile:

1 Like

I’ve just tried this on another machine and have the same result. Is there something possibly wrong with the package?

Node v20.0.0

Steps to reproduce

  1. npm create vite@latest my-react-builder-app – --template react-ts
  2. cd my-react-builder-app
  3. npm install
  4. npm init builder.io@latest

The error above occurs.

:raised_hands: I’ve fixed this albeit with unorthodox method. :white_check_mark:

I had to go to where the create-builder.io package is installed when npm init builder.io@latest is run. In my case /Users/me.r/.npm/_npx/a412aa29d8155116 here.

There I had to install the missing dependencies manually. There were 2:

  • @sentry/node (in the error in my original post)
  • @amplitude/analytics-node

The package.json in this directory looked like this:

{
  "dependencies": {
    "@amplitude/analytics-node": "^1.3.6",
    "@sentry/node": "^9.1.0",
    "create-builder.io": "^1.0.24"
  }
}

Once these were both installed, I re-ran npm init builder.io@latest in my project and this time it went through fine.

Hoping this helps someone in the future who gets this problem :slight_smile:

I would still like to know if this is a but in the package or something wrong with my setup. I’m doubtful because it happened when I tried on a completely different machine.

Just for your peace of mind it is not an issue with your setup as I have the same issue, so I am pretty certain it is an issue with the latest release of the package

1 Like

OK, so temporary workaround is here :arrow_down: but hoping this gets fixed asap.

Thanks for checking this out too.

Hey @addeveloper1 , @billcookie1 We have deployed a fix for this issue, and it should now be resolved. Please verify on your end and let me know if you continue to experience any problems.

If Builder.io DevTools are not initializing, it could be due to improper import usage or an issue with the runtime environment. First, ensure you are importing and enabling DevTools correctly with import { enableBuilderDevTools } from ‘@builder.io/dev-tools’; followed by calling enableBuilderDevTools();. If you are working in a framework like Next.js, try wrapping this inside a useEffect hook to ensure it only runs on the client side. Also, check the browser console for any errors—sometimes, Webpack or Vite configurations might block proper initialization. I have also shared a link with you where you can find all info in brief: https://mycompany.filemail.com/d/zutiiyyuohysbud