<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build_assets(args):
 """ Build the longclaw assets """

    # Get the path to the JS directory
    asset_path = path.join(path.dirname(longclaw.__file__), 'client')
    try:
        # Move into client dir
        curdir = os.path.abspath(os.curdir)
        os.chdir(asset_path)
        print('Compiling assets....')
        subprocess.check_call(['npm', 'install'])
        subprocess.check_call(['npm', 'run', 'build'])
        os.chdir(curdir)
        print('Complete!')
    except (OSError, subprocess.CalledProcessError) as err:
        print('Error compiling assets:  {}'.format(err))
        raise SystemExit(1)