This repository was archived by the owner on Feb 26, 2024. It is now read-only.
  
  
  
  
truffle compile error #6227
              
                Unanswered
              
          
                  
                    
                      devdattanarawade97
                    
                  
                
                  asked this question in
                General Q&A
              
            Replies: 1 comment
-
| 
         Go to your  Step - 1 Step - 2  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    

Uh oh!
There was an error while loading. Please reload this page.
-
as i run truffle compile command am getting following error : Error [ERR_REQUIRE_ESM]: require() of ES Module .truffle-config.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules. Instead either rename truffle-config.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in D:\DAPP\package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
Beta Was this translation helpful? Give feedback.
All reactions