askrella / whatsapp-chatgpt

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

Error while installing on MacBook Air M2 chip #284

Closed mycloudvip closed 1 year ago

mycloudvip commented 1 year ago
    ```

npm run start

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

    file:///Users/user/whatsapp-chatgpt/node_modules/vite/dist/node/chunks/dep-75f53616.js:55294
            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/user/whatsapp-chatgpt/node_modules/qrcode-terminal/lib/main.js
    Contents of line 3:     black = "\033[40m  \033[0m",
        at ssrTransformScript (file:///Users/user/whatsapp-chatgpt/node_modules/vite/dist/node/chunks/dep-75f53616.js:55294:15)
        at ssrTransform (file:///Users/user/whatsapp-chatgpt/node_modules/vite/dist/node/chunks/dep-75f53616.js:55269:12)
        at Object.ssrTransform (file:///Users/user/whatsapp-chatgpt/node_modules/vite/dist/node/chunks/dep-75f53616.js:64943:20)
        at loadAndTransform (file:///Users/user/whatsapp-chatgpt/node_modules/vite/dist/node/chunks/dep-75f53616.js:54940:24)
        at ViteNodeServer._transformRequest (file:///Users/user/whatsapp-chatgpt/node_modules/vite-node/dist/server.mjs:369:16)
        at ViteNodeServer._fetchModule (file:///Users/user/whatsapp-chatgpt/node_modules/vite-node/dist/server.mjs:336:17)
        at ViteNodeRunner.directRequest (file:///Users/user/whatsapp-chatgpt/node_modules/vite-node/dist/client.mjs:235:46)
        at ViteNodeRunner.cachedRequest (file:///Users/user/whatsapp-chatgpt/node_modules/vite-node/dist/client.mjs:186:14)
        at ViteNodeRunner.dependencyRequest (file:///Users/user/whatsapp-chatgpt/node_modules/vite-node/dist/client.mjs:221:12)
        at /Users/user/whatsapp-chatgpt/src/index.ts:1:31

    Node.js v20.5.0
navopw commented 1 year ago

I fixed lots of issues. It currently works on my side.

I will close this PR for now. If you still have issues, please open another PR.

Thanks!