0

I'm back with new question.

I'm stucked with this error: TypeError: Cannot convert a Symbol value to a string

Weird thing is, My code is exactly same at both linux and window WSL.

but when I copy and paste my project from linux to WSL, it occurs above error.

Of course I did everything that I found at googling but all don't works.

Why this error occurs in windows and what should I do?

below is error message

TypeError: Cannot convert a Symbol value to a string
    at Array.join (<anonymous>)
    at GlobSync._process (/mnt/c/Users/pc/Desktop/WSL/collection_book_real/node_modules/mocha/node_modules/glob/sync.js:112:53)
    at new GlobSync (/mnt/c/Users/pc/Desktop/WSL/collection_book_real/node_modules/mocha/node_modules/glob/sync.js:45:10)
    at Function.globSync [as sync] (/mnt/c/Users/pc/Desktop/WSL/collection_book_real/node_modules/mocha/node_modules/glob/sync.js:23:10)
    at lookupFiles (/mnt/c/Users/pc/Desktop/WSL/collection_book_real/node_modules/mocha/lib/cli/lookup-files.js:89:24)
    at /mnt/c/Users/pc/Desktop/WSL/collection_book_real/node_modules/mocha/lib/cli/collect-files.js:36:39
    at Array.reduce (<anonymous>)
    at module.exports (/mnt/c/Users/pc/Desktop/WSL/collection_book_real/node_modules/mocha/lib/cli/collect-files.js:34:26)
    at singleRun (/mnt/c/Users/pc/Desktop/WSL/collection_book_real/node_modules/mocha/lib/cli/run-helpers.js:120:17)
    at exports.runMocha (/mnt/c/Users/pc/Desktop/WSL/collection_book_real/node_modules/mocha/lib/cli/run-helpers.js:190:10)
    at Object.exports.handler (/mnt/c/Users/pc/Desktop/WSL/collection_book_real/node_modules/mocha/lib/cli/run.js:374:11)
    at /mnt/c/Users/pc/Desktop/WSL/collection_book_real/node_modules/yargs/build/index.cjs:443:71
4
  • 1
    Please if you can, consider moving error text to a question. You can copy the error text, type ``` then linebreak, then paste error text, then linebreak again, then ```. If you don't understand something, paste error text to question, then I will edit this so I hope you will understand how to do that. Commented Jul 28, 2023 at 6:37
  • Thank you I did it
    – 0xLuckycig
    Commented Jul 28, 2023 at 6:44
  • Now the image isn't required. You can just remove it. :) Commented Jul 28, 2023 at 6:58
  • 1
    cool! it works like pull request
    – 0xLuckycig
    Commented Jul 28, 2023 at 7:02

1 Answer 1

1

Your project folder is in WSL mnt (mounted folder from host OS). This will cause all kinds of strange behaviors.

Try running in inside WSL folder not mounted one.

4
  • Thank you for a reply! I understood your suggestion, but how can I access to my project folder using WSL without mounting? Sorry for basic question but I googled it too and cannot find some solution :(
    – 0xLuckycig
    Commented Jul 28, 2023 at 5:15
  • NVM above question I added my project folder into home directory. But same error still occurs :( maybe I gotta use "anchor clean" and build again
    – 0xLuckycig
    Commented Jul 28, 2023 at 5:24
  • May I ask how you copy the project folder into WSL home? If you're using host OS utilities to do the copy, WSL will not have the permission to write temp files into your project folder. You should be using Linux terminal to setup the folder.
    – BFault
    Commented Jul 28, 2023 at 5:45
  • I copied with Windows GUI which is literally copied and pasted folder using my mouse.. okay I'll try it using Linux terminal thank you
    – 0xLuckycig
    Commented Jul 28, 2023 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.