~/D/p/newton-raphson grunt build --brands=HNM (base)
Running "build" task
Fatal error: Perennial task failed:
AssertionError [ERR_ASSERTION] [ERR_ASSERTION]: Unknown brand: HNM
at /Users/mayankpandey/Desktop/phetsims/chipper/js/grunt/Gruntfile.js:242:34
at Array.forEach (<anonymous>:null:null)
at /Users/mayankpandey/Desktop/phetsims/chipper/js/grunt/Gruntfile.js:242:16
at Object.<anonymous> (/Users/mayankpandey/Desktop/phetsims/chipper/js/grunt/Gruntfile.js:102:13)
at Object.thisTask.fn (/Users/mayankpandey/Desktop/phetsims/newton-raphson/node_modules/grunt/lib/grunt/task.js:70:16)
at Object.<anonymous> (/Users/mayankpandey/Desktop/phetsims/newton-raphson/node_modules/grunt/lib/util/task.js:294:30)
at Task.runTaskFn (/Users/mayankpandey/Desktop/phetsims/newton-raphson/node_modules/grunt/lib/util/task.js:244:24)
at Task.<anonymous> (/Users/mayankpandey/Desktop/phetsims/newton-raphson/node_modules/grunt/lib/util/task.js:293:12)
at Task.start (/Users/mayankpandey/Desktop/phetsims/newton-raphson/node_modules/grunt/lib/util/task.js:302:5)
at Object.grunt.tasks (/Users/mayankpandey/Desktop/phetsims/newton-raphson/node_modules/grunt/lib/grunt.js:155:8)
at Liftoff.<anonymous> (/usr/local/lib/node_modules/grunt-cli/bin/grunt:66:13)
at Liftoff.execute (/usr/local/lib/node_modules/grunt-cli/node_modules/liftoff/index.js:203:12)
at module.exports (/usr/local/lib/node_modules/grunt-cli/node_modules/flagged-respawn/index.js:51:3)
at Liftoff.<anonymous> (/usr/local/lib/node_modules/grunt-cli/node_modules/liftoff/index.js:195:5)
at Liftoff.<anonymous> (/usr/local/lib/node_modules/grunt-cli/node_modules/liftoff/index.js:170:7)
at processTicksAndRejections (internal/process/task_queues.js:75:11)
I was able to fix this error by following this path: phetsims/chipper/js/common/ChipperConstants.js and updated the BRANDS array with the new brand name, however then I encountered a new error:
Fatal error: Perennial task failed:
ModuleNotFoundError: Module not found: Error: Can't resolve '../../phet-io/js/phetioEngine.js' in '/Users/mayankpandey/Desktop/phetsims/joist/js'
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/webpack/lib/Compilation.js:925:10
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/webpack/lib/NormalModuleFactory.js:401:22
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/webpack/lib/NormalModuleFactory.js:130:21
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/webpack/lib/NormalModuleFactory.js:224:22
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/neo-async/async.js:2830:7
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/neo-async/async.js:6877:13
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/webpack/lib/NormalModuleFactory.js:214:25
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/Resolver.js:213:14
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (<anonymous>:15:1)
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (<anonymous>:15:1)
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (<anonymous>:27:1)
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (<anonymous>:16:1)
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/RootPlugin.js:37:38
at _next42 (<anonymous>:8:1)
at eval (<anonymous>:31:1)
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (<anonymous>:16:1)
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (<anonymous>:16:1)
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (<anonymous>:15:1)
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/DirectoryExistsPlugin.js:27:15
at /Users/mayankpandey/Desktop/phetsims/chipper/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:85:15
at processTicksAndRejections (internal/process/task_queues.js:75:11)
Full Error details:
ModuleNotFoundError: Module not found: Error: Can't resolve '../../phet-io/js/phetioEngine.js' in '/Users/mayankpandey/Desktop/phetsims/joist/js'
It took me a while to figure out where the error was originating and found it was at this path: phetsims/joist/js/simLauncher.js
Where I found this block of code
if ( Tandem.PHET_IO_ENABLED ) {
const unlockPhetioEngine = asyncLoader.createLock( { name: 'phetioEngine' } );
import( /* webpackMode: "eager" */ '../../phet-io/js/phetioEngine.js' ).then( module => {
phetioEngine = module.default;
unlockPhetioEngine();
} );
}
And I commented it out and then tried the grunt build --brands=HNM command again and it this time it worked. My concern is still the fact that this might be a makeshift workaround and so I was wondering how to actually fix the problem. I would appreciate your insight!
Thanks,
Mayank Pandey