askrella / whatsapp-chatgpt

ChatGPT + DALL-E + WhatsApp = AI Assistant :rocket: :robot:
3.49k stars 842 forks source link

Error: Parse failure: Octal literal in strict mode (3:13) #277

Closed apfordz closed 1 year ago

apfordz commented 1 year ago

Hi,

following instructions and when running getting the following error.

`Node.js v20.4.0 EXAMPLE_USER@MacBook-Pro-2 whatsapp-chatgpt % sudo npm run start

whatsapp-chatgpt@1.0.0 start npx vite-node src/index.ts

file:///Users/EXAMPLE_USER/.npm/_npx/f2342a4b64a2bc92/node_modules/vite/dist/node/chunks/dep-abb4f102.js:55244 throw new Error(Parse failure: ${err.message}\nAt file: ${url}\nContents of line ${line}: ${code.split('\n')[line - 1]}); ^

Error: Parse failure: Octal literal in strict mode (3:13) At file: /Users/EXAMPLE_USER/Documents/GitHub/whatsapp-chatgpt/node_modules/qrcode-terminal/lib/main.js Contents of line 3: black = "\033[40m \033[0m", at ssrTransformScript (file:///Users/EXAMPLE_USER/.npm/_npx/f2342a4b64a2bc92/node_modules/vite/dist/node/chunks/dep-abb4f102.js:55244:15) at ssrTransform (file:///Users/EXAMPLE_USER/.npm/_npx/f2342a4b64a2bc92/node_modules/vite/dist/node/chunks/dep-abb4f102.js:55219:12) at Object.ssrTransform (file:///Users/EXAMPLE_USER/.npm/_npx/f2342a4b64a2bc92/node_modules/vite/dist/node/chunks/dep-abb4f102.js:64879:20) at loadAndTransform (file:///Users/EXAMPLE_USER/.npm/_npx/f2342a4b64a2bc92/node_modules/vite/dist/node/chunks/dep-abb4f102.js:54890:24) at ViteNodeServer._transformRequest (file:///Users/EXAMPLE_USER/.npm/_npx/f2342a4b64a2bc92/node_modules/vite-node/dist/server.mjs:373:16) at ViteNodeServer._fetchModule (file:///Users/EXAMPLE_USER/.npm/_npx/f2342a4b64a2bc92/node_modules/vite-node/dist/server.mjs:340:17) at ViteNodeRunner.directRequest (file:///Users/EXAMPLE_USER/.npm/_npx/f2342a4b64a2bc92/node_modules/vite-node/dist/client.mjs:248:46) at ViteNodeRunner.cachedRequest (file:///Users/EXAMPLE_USER/.npm/_npx/f2342a4b64a2bc92/node_modules/vite-node/dist/client.mjs:197:14) at ViteNodeRunner.dependencyRequest (file:///Users/EXAMPLE_USER/.npm/_npx/f2342a4b64a2bc92/node_modules/vite-node/dist/client.mjs:231:12) at /Users/EXAMPLE_USER/Documents/GitHub/whatsapp-chatgpt/src/index.ts:1:31 `

Stack says something in relation to regex but I have not been able to resolve. Any help for a neewbie greatly appreciated. Thanks

apfordz commented 1 year ago

Solved - https://github.com/askrella/whatsapp-chatgpt/issues/254#issuecomment-1585765922

apfordz commented 1 year ago

See above